Skip to content

Instantly share code, notes, and snippets.

@malexandre
Created November 5, 2014 08:26
Show Gist options
  • Save malexandre/67f429e0b2b7625143fe to your computer and use it in GitHub Desktop.
Save malexandre/67f429e0b2b7625143fe to your computer and use it in GitHub Desktop.
Git aliases
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
eu = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; subl `f`"
au = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; git add `f`"
pop = !sh -c 'git stash pop'
ro = "!git stash; git rebase origin/$1; git pop"
reb = "!git fetch; git ro $1"
mp = "!git stash; git checkout $1; git merge @{-1}; git push origin $1; git checkout @{-1}; git pop"
rmp = "!git reb $1; git mp $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment