Skip to content

Instantly share code, notes, and snippets.

@stephen-james
Created January 28, 2015 13:24
Show Gist options
  • Save stephen-james/1986d430d58ce7ffc8a9 to your computer and use it in GitHub Desktop.
Save stephen-james/1986d430d58ce7ffc8a9 to your computer and use it in GitHub Desktop.
git aliases I use
[alias]
co = checkout
ec = config --global -e
cob = checkout -b
cm = !git add -A && git commit -m
new = !git co master && git pull origin master && git checkout -b
track = git
st = status
br = branch
last = log -1 --stat
cp = cherry-pick
cl = clone
ci = commit
unstage = reset HEAD --
dc = diff --cached
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative --all
lucky = "!f() { git branch | grep -i " $1 " | head -1 | xargs -r git checkout; }; f"
find = "!f() { git branch | grep -i " $1 ";}; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment