-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig
112 lines (98 loc) · 3.82 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[user]
email = [email protected]
name = John Schoenick
[color]
diff = auto
status = auto
branch = auto
log = auto
ui = true
[core]
excludesfile = /home/johns/.gitignore
pager = diff-so-fancy | less --tabs=4 -RFX
# ; For git-repacking large files causing OOMs. These options all only affect
# ; packing speed, not result, unless noted.
# [core]
# ; per-thread cache
# deltaBaseCacheLimit = 128m
# [pack]
# ; memory usage scales linearly with threads
# threads = 2
# ; Max size (depth) of a delta to put in cache
# deltaCacheLimit = 10
# ; per-thread memory cache
# deltaCacheSize = 1g
# ; per-thread - if a delta hits this size, stop growing the window. Affects
# ; final pack quality by limiting window size
# pack.windowMemory = 1g
# ; Packs bigger than this size are just kept as is instead of unpacking,
# ; leading to less efficient repo growth but faster fetch/receive. There's also
# ; fetch.unpackLimit and receive.unpackLimit.
[transfer]
unpackLimit = 1
[bz]
browser = firefox3
default-tracker = bugzilla.mozilla.org
default-product = Core
default-component = General
[merge]
renamelimit = 9000
conflictstyle = diff3
tool = gitmerge
; The "gitmerge" tool just passes variables to ~/bin/gitmerge
[mergetool "gitmerge"]
cmd = $HOME/bin/gitmerge $BASE $LOCAL $REMOTE $MERGED
[push]
default = simple
autoSetupRemote = true
[alias]
fcl = "!cd \"${GIT_PREFIX:-.}\" && set -x && git reset -- \"$@\" && git checkout -f -- \"$@\" #"
mergepoint = "!x() { git config branch.\"$1\".merge 2>/dev/null; }; x $(git thisbranch)"
ll = log --oneline --decorate
lp = log --patch
lpd = log --patch .
llp = log --patch --oneline --decorate
st = status --ignore-submodule=untracked
pff = pull --ff-only
cm = commit -m
bzaq = !git bz attach -n -e $(git merge-base HEAD @{u})..
exec = ! exec
eval = ! eval
root = !pwd
fetch-current = "! upstream=\"$(git rev-parse --symbolic-full-name @{u})\"; remote=\"${upstream#refs/remotes/}\"; if [[ -n $remote && $remote != $upstream ]]; then echo \"+ git fetch ${remote%%/*}\" && git fetch \"${remote%%/*}\"; else echo >&2 \"Could not find upstream (@{u} is \\\"$upstream\\\")\"; fi;"
su = submodule update --init --recursive
emails = "!x() { local b=\"$1\"; [[ -n $b ]] || b=HEAD; git log --format=\"format:%ae\" \"$b\" | sort | uniq; }; x"
current-branch = "! x() { if [[ $# -ne 0 ]]; then echo >&2 \"!! current-branch takes no arguments\"; return 1; fi; local f=\"$(git rev-parse --symbolic-full-name HEAD)\" && local b=\"${f#refs/heads/}\" && if [[ $b = $f ]]; then return 1; else echo \"$b\"; fi; }; x"
dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f"
fetchpr = fetch origin +refs/pull/*/head:refs/remotes/origin/pr/*
dc = diff --cached
ap = add -p .
hmr = "!x() { ( set -e; source ~/bin/lib/util.sh; [[ $# -le 1 ]] || die \"usage: git hmr [remote branch name]\"; local b; b=$(git symbolic-ref HEAD --short); [[ ${b:-main} != main ]] || die \"Not pushing no branch/main\"; local target=$b; [[ ${target#johns/} != \"$target\" ]] || target=johns/$target;cmd git push -u origin HEAD:\"$target\"; cmd xdg-open \"https://gitlab.steamos.cloud/holo/holo/-/merge_requests/new?merge_request%5Bsource_branch%5D=$target${1:+&merge_request%5Btarget_branch%5D=$1}\"; ); }; x"
[column]
ui = auto
[pull]
ff = only
[diff]
algorithm = patience
[rerere]
enable = true
enabled = true
[rebase]
autoStash = true
[init]
defaultBranch = main
[diff-so-fancy]
stripLeadingSymbols = false
first-run = false
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse