d1rk
11/28/2011 - 1:37 PM

git useful tools

git useful tools

#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\]$ '
[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