-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
92 lines (68 loc) · 2.1 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
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
[user]
name = Daniel Hess
email = [email protected]
signingKey = 9E9957DF1655FD23
# Work specific settings
[include]
path = .work_gitconfig
# URL Rewrites
[url "[email protected]:dan9186"]
insteadOf = https://github.com/dan9186
email = [email protected]
[url "[email protected]:gomicro"]
insteadOf = https://github.com/gomicro
email = [email protected]
[alias]
# Show a graphed history of the repo
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
# Show a history of the merges
lgm = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --merges
# List contributors with number of commits
contributors = shortlog --summary --numbered
# Clean up branches that have already been merged into master
cleanup = "!changes=$(git branch --merged | egrep -v '(master|main)'); if [[ -n "$changes" ]]; then echo $changes | xargs git branch -d; fi"
# Force push only if no one else has pushed up additional commits
forcepush = push --force-with-lease
# Remove the old tag with this name and tag the latest commit with it.
retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
[filter "media"]
clean = git media clean %f
smudge = git media smudge %f
required = true
# CLI Options
[fetch]
prune = true
[merge]
tool = vimdiff
conflictstyle = diff3
ff = only
[mergetool]
prompt = false
[diff]
tool = vimdiff
renames = copies # Detect copies as well as renames
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[rebase]
autosquash = true
[pull]
ff = only
[push]
default = matching
followTags = true
[commit]
gpgsign = true
[init]
defaultBranch = main
[gpg]
program = gpg2
# vim: filetype=gitconfig noexpandtab