-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
125 lines (116 loc) · 5 KB
/
Copy pathgitconfig
File metadata and controls
125 lines (116 loc) · 5 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
[github]
user = gregory
[user]
name = gregory
email = greg2502@gmail.com
[alias]
lg = log -g --format=raw --date=relative
l = log --format=raw --name-status --abbrev-commit --date=local
ll = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)-%an, %ar%Creset'
me = log --pretty=oneline --format=fuller --author=gregory
lp = log --pretty=oneline --date=relative
wtf = log -g --abbrev-commit --format=raw --date=local --decorate=full --pretty=oneline --all
lw = log -p --format=fuller --abbrev-commit --date=local
local = log --branches --not --remotes=origin --pretty=oneline
pr = "!f() { git fetch -fu ${2:-origin} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f"
pr-clean = "!git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done"
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
rb = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/remotes/origin"
rlb ="!git for-each-ref --sort=-committerdate refs/$1 --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"
lb ="!git for-each-ref --sort=-committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"
# `fame` removed: it called `python` (only python3 exists here) and gitfame,
# which is not installed — dead on both counts.
[color]
ui = true
interactive = auto
diff = auto
status = auto
branch = auto
[color "grep"]
linenumber = yellow bold
match = red
filename = magenta
[core]
excludesfile = ~/.gitignore
editor = vim
autocrlf = input
# -N is deliberately absent: it numbered every diff line, which makes copying
# a hunk out of a diff painful. -F quits if the output fits on one screen,
# -R keeps colour.
pager = less -MRF
logAllRefUpdates = true
# Performance. Measured in ~/src/github.com/life-connect/adb (8148 tracked
# files but 178,752 files on disk): `git status --porcelain` took 64ms, of
# which 47ms was the untracked-file walk (`-uno` ran in 17ms). The prompt runs
# status on every command, so this was paid constantly.
fsmonitor = true
untrackedCache = true
[maintenance]
# Keeps the commit-graph and loose objects in shape in the background.
# Enable per repo with `git maintenance start` — none of the big repos
# (extranet 18GB, adb 11GB, hlc-infra 2.8GB) had a commit-graph at all.
#
# NOTE: `git maintenance start` writes its `maintenance.repo = <abs path>`
# entries into whichever file this is, which is a tracked dotfile. Those paths
# are machine-specific, so they live in ~/.gitconfig.local instead (see the
# include at the end of this file) and this file stays portable.
auto = true
[fetch]
prune = true
pruneTags = true
parallel = 0
[rerere]
# pull.rebase is on below, so the same conflicts come back on every rebase.
# This replays resolutions already made once.
enabled = true
autoUpdate = true
[rebase]
autoStash = true
# Rewrites branches stacked on the one being rebased instead of orphaning
# them.
updateRefs = true
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[merge]
# `tool = meld` removed — meld is not installed, and it is a GTK/Linux tool.
# Shows the merge base alongside both sides, so you can see what each branch
# actually changed instead of guessing from two conflicting versions.
conflictStyle = zdiff3
[mergetool]
keepBackup = false
[push]
default = simple
# Stops `git push` on a fresh branch from failing with "no upstream".
autoSetupRemote = true
[pull]
rebase = true
[branch]
# `git branch` lists most-recently-worked-on first.
sort = -committerdate
[column]
ui = auto
[url "https://"]
insteadOf = git://
# Removed: [difftool/mergetool "sourcetree"] — /Applications/SourceTree.app is
# not installed, and the mergetool cmd pointed inside that missing bundle.
# Removed: [filter "media"] with required = true — git-media was superseded by
# git-lfs around 2015, nothing on this machine uses it, and `required` meant any
# repo that did reference it would hard-fail rather than degrade. No repo does.
[diff]
wsErrorHighlight = all
# Follows moved code blocks far better than the default Myers algorithm.
algorithm = histogram
[credential]
helper = osxkeychain
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
# Machine-specific settings: absolute paths, per-machine identities, and
# anything `git maintenance start` appends. Kept out of version control.
# Last so it wins over anything above.
[include]
path = ~/.gitconfig.local