-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig.symlink
113 lines (98 loc) · 3.75 KB
/
.gitconfig.symlink
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# vim: set filetype=gitconfig:
[user]
name = Hugues Demers
email = hdemers@gmail.com
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
;[color "diff"]
;meta = yellow bold
;frag = magenta bold
;old = red bold
;new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[alias]
st = status
ci = commit
br = branch
co = checkout
sw = switch
df = diff
dc = diff --cached
dm = diff master --stat
dmm = diff master... --stat
lg = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(bold blue)[%an]%Creset%n' --abbrev-commit --date=relative --stat
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative
all = log --branches --remotes --tags --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)[%an]%Creset' --abbrev-commit --date=relative HEAD
rb = "!r() { refbranch=$1 count=$2; git for-each-ref --sort=-committerdate refs/heads \
--format='%(refname:short)|\
%(HEAD)%(color:yellow)%(refname:short)|\
%(color:green)%(committerdate:relative)|\
%(color:blue)%(subject)|\
%(color:magenta)%(authorname)%(color:reset)' \
--color=always \
--count=${count:-20} \
| while read line; do branch=$(echo \"$line\" | awk 'BEGIN { FS = \"|\" }; { print $1 }' | tr -d '*'); \
ahead=$(git rev-list --count \"${refbranch:-origin/master}..${branch}\"); \
behind=$(git rev-list --count \"${branch}..${refbranch:-origin/master}\"); \
colorline=$(echo \"$line\" | sed 's/^[^|]*|//'); \
echo \"$colorline|$ahead|$behind\" | awk -F'|' -vOFS='|' '{$3=substr($3,1,70)}1' ; done \
| ( echo \"branch|lastcommit|message|author|ahead|behind\\n\" && cat) | column -ts'|';}; r"
rba = "!r() { refbranch=$1 count=$2; git for-each-ref --sort=-committerdate refs/heads refs/remotes \
--format='%(refname:short)|\
%(HEAD)%(color:yellow)%(refname:short)|\
%(color:green)%(committerdate:relative)|\
%(color:blue)%(subject)|\
%(color:magenta)%(authorname)%(color:reset)' \
--color=always \
--count=${count:-20} \
| grep -v 'refs/remotes/origin/HEAD' \
| while read line; do branch=$(echo \"$line\" | awk 'BEGIN { FS = \"|\" }; { print $1 }' | tr -d '*'); \
branch=${branch#refs/remotes/}; \
ahead=$(git rev-list --count \"${refbranch:-origin/master}..${branch}\"); \
behind=$(git rev-list --count \"${branch}..${refbranch:-origin/master}\"); \
colorline=$(echo \"$line\" | sed 's/^[^|]*|//'); \
echo \"$colorline|$ahead|$behind\" | awk -F'|' -vOFS='|' '{$3=substr($3,1,70)}1' ; done \
| ( echo \"branch|lastcommit|message|author|ahead|behind\\n\" && cat) | column -ts'|';}; r"
ls = ls-files
lsp = diff --stat
lcp = log master..HEAD
prm = log master..HEAD --pretty=format:'"####" %s (%h)%n%b' --reverse
uncommit = reset --soft HEAD~1
unmerge = reset --merge ORIG_HEAD
[core]
excludesfile = /home/hdemers/.gitignore
;autocrlf = true
pager = delta
[branch]
autosetupmerge = true
[push]
default = current
[github]
user = hdemers
[gist]
private = yes
[init]
defaultBranch = main
[delta]
side-by-side = true
syntax-theme = Solarized (dark)
[credential]
helper = cache
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
# delta detects terminal colors automatically; set one of these to disable auto-detection
# dark = true
# light = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default