Created
February 28, 2012 15:33
-
-
Save paul-matthews/1933166 to your computer and use it in GitHub Desktop.
My git aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
d = difftool | |
br = branch | |
cb = checkout -b | |
ci = commit | |
co = checkout | |
coh = !git checkout-head | |
dc = svn dcommit | |
dcommit = svn dcommit | |
fa = !git fetch-all | |
gh = !git get-head | |
ghr = !git get-head-remote | |
last = log -1 HEAD | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all | |
log1 = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all | |
nm = branch -a --no-merge | |
pf = pull --ff-only | |
pu = pull | |
scoh = !git submodule-checkout-head | |
sf = !git submodule-foreach | |
sfb = !git submodule-foreach-branch | |
st = status | |
up = svn rebase | |
amend = commit --amend | |
checkout-head = !git checkout `git get-head` | |
fetch-all = !git fetch --all | |
get-branch = !git branch | grep '*' | cut -b 3- | |
get-head = !git branch --no-color --contains HEAD | grep -v '(no branch)' | head -n 1 | cut -b 3- | |
get-head-remote = !git branch -a --no-color --contains HEAD | grep -v '(no branch)' | grep 'remote' | head -n 1 | cut -b 11- | sed -E 's/^([^\\/]+\\/.*)$/\\1/' | |
submodule-checkout-head = !git submodule-foreach git checkout-head | |
submodule-foreach = submodule foreach | |
submodule-foreach-branch = !git submodule-foreach git get-branch | |
unstage = reset HEAD -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment