Skip to content

Instantly share code, notes, and snippets.

@mcfog
Last active November 29, 2019 07:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mcfog/078c2a8ab6fd3d2158f3 to your computer and use it in GitHub Desktop.
Save mcfog/078c2a8ab6fd3d2158f3 to your computer and use it in GitHub Desktop.
abbr g git
abbr ga 'git add'
abbr gaa 'git add --all'
abbr gb 'git branch'
abbr gbda git\ branch\ --merged\ \|\ command\ grep\ -vE\ \"\^\(\\\*\|\\s\*master\\s\*\\\$\)\"\ \|\ command\ xargs\ -n\ 1\ git\ branch\ -d
abbr gbnm 'git branch --no-merged'
abbr gbr 'git branch --remote'
abbr gc 'git commit -v'
abbr gc! 'git commit -v --amend'
abbr gca 'git commit -v -a'
abbr gca! 'git commit -v -a --amend'
abbr gca!! 'git commit -v -a --amend --no-edit'
abbr gcam 'git commit -a -m'
abbr gcb 'git checkout -b'
abbr gco 'git checkout'
abbr gcp 'git cherry-pick'
abbr gf 'git fetch'
abbr gfa 'git fetch --all --prune'
abbr ggsup 'git branch --set-upstream-to=origin/(current_branch)'
abbr gignore 'git update-index --assume-unchanged'
abbr gignored 'git ls-files -v | grep "^[[:lower:]]"'
abbr gl 'git pull'
abbr glg 'git log --stat --color'
abbr glgg 'git log --graph --color'
abbr glgga 'git log --graph --decorate --all'
abbr glgm 'git log --graph --max-count=10'
abbr glgp 'git log --stat --color -p'
abbr glo 'git log --oneline --decorate --color -20'
abbr glog 'git log --oneline --decorate --color --graph'
abbr glol '"git log --graph --pretty=format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset --abbrev-commit"'
abbr glola '"git log --graph --pretty=format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset --abbrev-commit --all"'
abbr glr 'git pull --rebase'
abbr glrap 'git pull --rebase; and git push'
abbr gm 'git merge'
abbr gmc 'gitmoji -c'
abbr gmf 'git merge --no-ff --no-edit'
abbr gmob 'git merge origin/(current_branch)'
abbr gp 'git push'
abbr gpb 'git push --set-upstream origin (current_branch)'
abbr gr 'git remote'
abbr grb 'git rebase'
abbr grba 'git rebase --abort'
abbr grbc 'git rebase --continue'
abbr grbi 'git rebase -i'
abbr grbs 'git rebase --skip'
abbr grcb 'git reset (current_branch)'
abbr grcbh 'git reset --hard (current_branch)'
abbr grh 'git reset HEAD'
abbr grhh 'git reset --hard HEAD'
abbr grob 'git reset origin/(current_branch)'
abbr grobh 'git reset --hard origin/(current_branch)'
abbr grt 'cd (git rev-parse --show-toplevel; or echo ".")'
abbr gru 'git reset --'
abbr gsb 'git status -sb'
abbr gsp 'git subrepo'
abbr gspa 'git subrepo push --all'
abbr gspl 'git subrepo pull --all'
abbr gsr 'git svn rebase'
abbr gss 'git status -s'
abbr gst 'git status'
abbr gsta 'git stash'
abbr gstaa 'git stash apply'
abbr gstd 'git stash drop'
abbr gstl 'git stash list'
abbr gstp 'git stash pop'
abbr gsts 'git stash show --text'
abbr gsu 'git submodule update'
abbr gunignore 'git update-index --no-assume-unchanged'
abbr gunwip git\ log\ -n\ 1\ \|\ grep\ -q\ -c\ \"\\-\\-wip\\-\\-\"\;\ and\ git\ reset\ HEAD\~1
abbr gwch 'git whatchanged -p --abbrev-commit --pretty=medium'
abbr gwip 'git add -A; git rm (git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment