Skip to content

Instantly share code, notes, and snippets.

@robbestad
Created June 30, 2013 21:02
Show Gist options
  • Select an option

  • Save robbestad/5896871 to your computer and use it in GitHub Desktop.

Select an option

Save robbestad/5896871 to your computer and use it in GitHub Desktop.
Git aliases
//add to ~/.gitconfig
[alias]
cp = cherry-pick
st = status -s
ci = commit
br = branch
co = checkout
df = diff --wrod-diff
lg = log -pm
sl = stash list
sa = stash apply
ss = stash save
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)'
conflicts = !git ls-files --unmerged | cut -f2 | sort -u
count-conflicts = !grep -c '^=======$'
count-all-conflicts = !grep -c '^=======$' $(git conflicts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment