Add .gitconfig, with aliases and pager config

The pager config colors the diff and use less as a pager,
After having called "git diff", you just will just have to type 'n'
to iterate over diff sections.
This commit is contained in:
Johann Dreo 2013-03-12 11:26:31 +01:00
commit 038376c1a4

20
.gitconfig Normal file
View file

@ -0,0 +1,20 @@
[user]
name = nojhan
email = nojhan@nojhan.net
[alias]
up = pull origin
st = status
di = diff
co = checkout
# create branch
cb = checkout -b
ci = commit
br = branch
sta = stash
[core]
# color the diff, use less as pager
# -R is necessary to display colors in less
# the '+' calls a command at start, that will jump to the first diff section
# then, you just have to type 'n' to iterate over diff sections
pager = colordiff | less -R +'/-{3}'