Last active
August 1, 2017 16:38
-
-
Save avanslaars/fe8587527a977996c65d9e8fa07a8ee7 to your computer and use it in GitHub Desktop.
Git aliases
This file contains hidden or 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] | |
aliases = config --get-regexp '^alias\\.' | |
br = branch | |
branch-name = rev-parse --abbrev-ref HEAD | |
ci = commit -m | |
cm = !git add -A && git commit -m | |
co = checkout | |
cb = rev-parse --abbrev-ref HEAD | |
cob = checkout -b | |
cl = checkout - | |
df = diff --name-only | |
dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f" | |
hist = log --graph --full-history --all --color --pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s" | |
l = log | |
lg1 = log --graph --abbrev-commit --decorate --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)' --all | |
lo = log --oneline | |
lobr = log --oneline dev..head | |
poop = stash pop | |
pr = "!git push -u origin $(git branch-name)" | |
s = status | |
save = !git add -A && git commit -m "SAVEPOINT" | |
st = status -sb | |
stuck = stash -u -k | |
undo = reset HEAD~1 --mixed | |
unpub = "!git push origin :$(git branch-name)" | |
unstage = reset HEAD | |
wip = !git add -u && git commit -m "WIP" | |
wipe = !git add -A && git commit -qm "WIPE SAVEPOINT" && git reset HEAD~1 --hard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment