-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
49 lines (46 loc) · 1.18 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
[color]
ui = auto
[credential]
helper = store
[diff]
tool = bc3
external = git-diff-wrapper.sh
[difftool]
bc3 = trustExitCode
[merge]
tool = bc3
[mergetool]
bc3 = trustExitCode
[alias]
dt = difftool
mt = mergetool
co = checkout
ch = checkout
ci = commit
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
pl = pull
st = status
type = cat-file -t
dump = cat-file -p
#Autostash before a git command `git s rebase ....`
s = !sh -c \"git stash save | grep 'No local changes to save' && git $* || (git $* && git stash pop) \"
autostash = !sh -c \"git s $*\"
autopull = !sh -c \"git s pull\"
ap = !git autopull
pa = !git autopull
#-------------- display logs-------------
#define format...
mylogbase = log --pretty=format:'%Cred%h %Cgreen%<(10,trunc)%cd %C(auto)%d%Creset%s %C(bold blue)%an' --abbrev-commit
#...and use it!
mylog = !git mylogbase --date=relative
mylogshort = !git mylogbase --date=short
#...with a graph (DAG!)
graph = !git mylog --graph
#last changes
changes = !git mylog --name-status
#users stats
statdev = shortlog -sn
[mergetool "bc3"]
cmd = /usr/bin/bcompare $LOCAL $REMOTE -savetarget=$MERGED
trustExitCode = true