Written by

Roberto Segura

Category:

Blog

24 May 2013

[color]
	status = auto
	diff = auto
	branch = auto
	interactive = auto
	ui = true
[alias]
	amend = !"git commit --amend -C HEAD"
	st = status
	ci = commit
	co = checkout
	br = branch
	l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
	sm = log --summary
	pp = push produccion +master:refs/heads/master
	
	# hard reset
	rshard = reset --hard HEAD
	# undo last commit keeping files in stage
	undolast = reset --soft HEAD^
	untracked = ls-files . --exclude-standard --others
	ignored = ls-files . --ignored --exclude-standard --others
	# unstage file
	unstage = reset HEAD
	# unstage and remove local changes 
	discard = checkout HEAD
	# show git aliases
	aliases = config --get-regexp alias
	# list contributor stats for this repo
	contributors = !git shortlog -n -s --no-merges $@ | cat - && echo && echo total $(git rev-list --count HEAD)
	 # decorated graph view of one liner summarized commits from all branches. (inspired by git-extras)
	tree = log --all --graph --decorate --oneline --simplify-by-decoration
[user]
	name = Roberto - phproberto
	email = This email address is being protected from spambots. You need JavaScript enabled to view it.
[core]
	excludesfile = ~/.gitignore

I keep a Gist always updated to easily use it on any workstation.