-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig.example
81 lines (77 loc) · 2.21 KB
/
gitconfig.example
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
[user]
name = AUTHORNAME
email = AUTHOREMAIL
[alias]
st = status -s
s = status -s
c = commit -v
co = checkout
br = branch -v
b = branch -v
d = diff --patience
l = log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%<(7)%aN%Cgreen%d %Creset%s' --date=short -n 40 --abbrev-commit --graph --use-mailmap
rc = rebase --continue
rs = rebase --skip
rn = rebase next
m = merge --ff-only
put = push origin --set-upstream HEAD
# Remove branches that have already been merged with master
# a.k.a. ‘delete merged’
dm = "!git branch --merged | grep -v '\\*\\|next\\|master' | xargs --no-run-if-empty --max-args=1 git branch --delete"
; up = "!git remote update -p; git merge --ff-only @{u}"
loga = log --pretty=format:'%C(yellow)%h %C(red)%ad %C(blue)%<(7)%aN%C(green)%d %Creset%s' --date=short --abbrev-commit --graph
lognc = log --pretty=format:'%h %ad %<(7)%aN%d %s' --date=short --abbrev-commit --graph
# List contributors with number of commits
contributors = shortlog --summary --numbered
# http://jerodsanto.net/2014/09/git-a-list-of-commits-on-one-branch-but-not-the-other
contrast = log --left-right --graph --cherry-pick --oneline
# https://www.erikschierboom.com/2020/02/17/cleaning-up-local-git-branches-deleted-on-a-remote/
gone = "!git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D"
[color]
status = auto
diff = auto
branch = auto
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[color "status"]
added = yellow
changed = blue
untracked = cyan
[diff]
renamelimit = 0
renames = copies
compactionHeuristic = true
[help]
autocorrect = 1
[core]
excludesfile = ${HOME}/.gitignore
pager = delta
[init]
templatedir = ~/.git_template
defaultBranch = main
[interactive]
diffFilter = delta --color-only --features=interactive
[push]
default = simple
[merge]
tool = nvim -d
; Trying out zdiff3 for merge conflicts
conflictstyle = zdiff3
[mailmap]
file = ${HOME}/.mailmap
[branch]
sort = committerdate
[tag]
sort = taggerdate
[fetch]
prune = true
[delta]
theme = Solarized (dark)