Last active
February 18, 2016 12:44
-
-
Save husa/96840df37b2bb4a96de4 to your computer and use it in GitHub Desktop.
Usefull 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] | |
pr = pull --rebase origin | |
po = push origin | |
poH = pugh origin HEAD | |
co = checkout | |
st = status --short | |
f = fetch | |
fa = fetch --all | |
k = !gitk | |
ka = !gitk --all | |
history = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --abbrev-commit --date=short --max-count=20 | |
unstage = reset HEAD | |
undo = "!f() { echo 'Are you sure you want to revert your last commit?(y/n)'; read answer; case \"$answer\" in y) git reset --soft HEAD^ && echo done;; n) echo 'as you wish';; *) f;; esac; }; f"; | |
aliases = "!git config -l | grep alias | cut -c 7- | tr '=' '\t\t'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment