Created
November 28, 2011 13:37
-
-
Save d1rk/1400421 to your computer and use it in GitHub Desktop.
git useful tools
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] | |
st = status -sb | |
ci = commit | |
co = checkout | |
br = branch | |
lg = log --graph --pretty=format:'%C(yellow)%h%Creset -%Cblue%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative | |
info = config --list | |
last = log --format=medium -n 5 | |
rollback = reset HEAD~1 | |
unindex = reset HEAD | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto | |
[core] | |
editor = vim | |
quotepath = false | |
[merge] | |
summary = true |
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
#converts your prompt to something useful when in git repositories: | |
PS1='\[\033[38m\]\u@\h\[\033[0;32m\] \w \[\e[31m\]$(git branch 2>/dev/null|fgrep '\''*'\''|sed '\''s/$/) /;s/^* /( /'\'')\[\e[0m\]$ ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment