Skip to content

Instantly share code, notes, and snippets.

@alexchantastic
Last active December 18, 2015 03:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexchantastic/5715646 to your computer and use it in GitHub Desktop.
Save alexchantastic/5715646 to your computer and use it in GitHub Desktop.
Useful git aliases
[alias]
s = status -s
c = commit -a -m
aa = "!git add -u && git add . && git status -s"
amend = commit -a --amend
d = diff
dt = difftool
list-aliases = "!git config -l | grep alias | cut -c 7-"
# branch commnads
b = branch
co = checkout
cob = checkout -b
remove-merged = "!git branch --merged master | grep -v 'master$' | xargs git branch -d"
# grep commands
gpath = "!git ls-files | grep -i"
grep = grep -Ii
# log commands
l = log
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
https://github.com/visionmedia/git-extras
https://github.com/github/hub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment