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:
parent
edf02c9319
commit
038376c1a4
1 changed files with 20 additions and 0 deletions
20
.gitconfig
Normal file
20
.gitconfig
Normal 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}'
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue