Skip to content

Instantly share code, notes, and snippets.

@d1rk
Created November 28, 2011 13:37
Show Gist options
  • Save d1rk/1400421 to your computer and use it in GitHub Desktop.
Save d1rk/1400421 to your computer and use it in GitHub Desktop.
git useful tools
[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
#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