SarathSantoshDamaraju LazyGit Save

Cut-short long git commands

Project README

Codacy Badge license

🅛🅐🅩🅨🅖🅘🅣 🤟

Tired of typing lengthy git commands? Well, if you are amongst who feel like me, this repo is a savior for you. This repo includes shorthand commands for the regular git commands which you can type in a jiffy.

- I'd advice beginners to learn git commands first hand before using any shortcodes or aliases

Installation

  1. Clone or Download the repo.
  2. Run ./_install to install
  3. If you see any permissions related errors try ➡️chmod 755 _install and run ./_install again. or any error please raise a PR 😅
  4. Type gb to verify the installation and you must see git related output. If not try re-starting your terminal and try again.

Short Codes List

Function Shortcode Can pass default params with the function ? Details
git push <remote> <current-branch> gph-this <remote> No Utility Function to push the current branch
git pull <remote> <current-branch> gpl-this <remote> No Utility Function to pull the current branch
Command Shortcode Can pass default params with this command ? Git Repo Link
git init [<options>] g! [<options>] Yes :information_source:
git add . g. Yes :information_source:
git branch gb Yes :information_source:
git branch -a gb-a Yes :information_source:
git branch -d gb-d Yes :information_source:
git branch -m <name> gb-name <name> Yes :information_source:
git checkout -b <name> gb-new <name> No, You can only pass branch-name and --track or --no-track :information_source:
git checkout -- . g!. No, Discards all your changes :information_source:
git blame gblame Yes :information_source:
git clone <url> gcl <url> Yes :information_source:
git commit -m <message> gc <message> No, it accepts only commit message :information_source:
git diff [--options] <commit> [--] [<path>…] gd [--options] <commit> [--] [<path>…] Yes :information_source:
git fetch [<options>] [<repository> [<refspec>…] gf [<options>] [<repository> [<refspec>…]] Yes :information_source:
git log --graph --decorate --all gl No :information_source:
git log --summary gl-s Yes :information_source:
git push [<options>] [<remote>] [<branch>] gph [<options>] [<remote>] [<branch>] Yes :information_source:
git push -f [<remote>] [<branch>] gph-f <remote> <branch> Yes :information_source:
git pull [options] [<repository> [<refspec>…]] gpl [options] [<repository> [<refspec>…]] Yes :information_source:
git remote [commands] [<...>] gr [commands] [<...>] Yes :information_source:
git remote -v gr-v It acceps only <show> and <update> :information_source:
git remote add <name> <url> gr-update <name> <url> It accepts options related to <add> :information_source:
git remote update gr-update Only accepts <prune> :information_source:
git remote remove <name> gr-remove <name> No other options are needed other than <name> :information_source:
git reset [<mode>] <head> greset [<mode>] <head> Yes :information_source:
git reset --hard <head> greset-h <head> Takes only <head> :information_source:
git revert [<options>] [<subcommands>] grevert [<options>] [<subcommands>] Yes :information_source:
git revert HEAD grevert-h This reverts last commit only, Use the above for reseting other commits eg., grevert head~2 :information_source:
git status [<options>…] [--] [<pathspec>…] gs [<options>…] [--] [<pathspec>…] Yes :information_source:
git stash [<command>] [<options>] gsh [<command>] [<options>] Yes :information_source:
git stash apply [--index] [<stash>] gsh-a [--index] [<stash>] Yes :information_source:
git stash list [<options>] gsh-l [<options>] Yes :information_source:
git stash clear gsh-c No It clears all the stash list :information_source:
git stash pop [--index] gsh-p [--index] Yes :information_source:
git stash drop [<stash>] gsh-d [<stash>] Yes :information_source:
git tag -l --sort=v:refname | tail -n8 gt No :information_source:
git add . && git commit -m g.c <message> No, it accepts only commit message :information_source:
git rebase [< All options>] grb [<All options>] Yes :information_source:
git show [<options>] [<object>] gsw [<options>] [<object>] Yes :information_source:

To Contribute

I have added commands that I use frequently and scope for new commands (Bash Aliases) is less. But if you are interested you can raise a PR or please follow this branch


Tasks

  • Add Bash file with basic commands
  • Add Install via npm WIP
  • Add Install via pip (If interested, work and raise a PR)

Fell free to suggest and report, Raise a PR with [report] or [suggest] labels

Open Source Agenda is not affiliated with "SarathSantoshDamaraju LazyGit" Project. README Source: SarathSantoshDamaraju/lazyGit
Stars
33
Open Issues
5
Last Commit
4 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating