Skip to content

Instantly share code, notes, and snippets.

@t-mart
Created October 15, 2012 22:55
Show Gist options
  • Save t-mart/3896178 to your computer and use it in GitHub Desktop.
Save t-mart/3896178 to your computer and use it in GitHub Desktop.
My git aliases
Status
gst='git status'
gss='git status -s'
gstv='git status -v'
Remotes
gp='git push'
gl='git pull'
glom='git pull origin master'
ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
ggpull='git pull origin $(current_branch)'
ggpush='git push origin $(current_branch)'
gup='git fetch && git rebase'
Logs
gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr by %an)%Creset' --abbrev-commit --date=relative --max-count=20"
glg='git log --stat --max-count=5'
glgg='git log --graph --max-count=5'
gcount='git shortlog -sn'
Committing
ga='git add'
gad='git add .'
gc='git commit -v'
gca='git commit -v -a'
gcam='git commit --amend -v'
Checkouts
gco='git checkout'
gcm='git checkout master'
Branching
gb='git branch'
gba='git branch -a'
Merging
gm='git merge'
gm='git rebase'
Resetting
gr='git reset HEAD'
grh='git reset HEAD'
grhh='git reset HEAD --hard'
Diffing
gd='git diff'
Other
g='git'
gcp='git cherry-pick'
gsr='git svn rebase'
gsd='git svn dcommit'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment