Created
July 8, 2015 22:03
-
-
Save jabes/ce92b208ad5d52c11274 to your computer and use it in GitHub Desktop.
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] | |
l = log --pretty=format:\"%C(yellow)%h %ad%Cred%d %Creset%s%Cblue [%cn]\" --decorate --date=iso | |
la = "!git l --author=\"$(git config user.name)\"" | |
s = status --short | |
a = add | |
aa = add --all | |
ac = !git add . && git commit --all --message | |
b = branch | |
c = commit --verbose | |
cm = commit --verbose --message | |
ca = commit --verbose --all | |
cam = commit --verbose --all --message | |
co = checkout | |
cob = checkout -b | |
m = merge | |
d = diff | |
ds = diff --stat | |
dx = !git diff --name-only | grep --invert-match $@ | xargs git diff -- | |
sl = stash list | |
ss = stash save | |
sa = !git stash apply stash@{${1-0}} | |
sd = !git stash drop stash@{${1-0}} | |
sp = !git stash pop stash@{${1-0}} | |
aliases = config --get-regexp alias | |
ours = "!f() { git checkout --ours $@ && git add $@; }; f" | |
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f" | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
wip = !git add -update && git commit --message \"WIP\" | |
save = !git add --all && git commit --message \"SAVEPOINT\" | |
wipe = !git add --all && git commit -quiet --message \"WIPE SAVEPOINT\" && git reset HEAD~1 --hard | |
undo = reset HEAD~1 --mixed | |
amend = commit --all --amend | |
bclean = "!f() { git branch --merged ${1-master} | grep -v \" ${1-master}$\" | xargs -r git branch -d; }; f" | |
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment