-
Notifications
You must be signed in to change notification settings - Fork 4
/
gitconfig
78 lines (78 loc) · 2.77 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
[user]
name = Tim Hockin
email = [email protected]
[include]
path = ~/.gitconfig.local
[alias]
co = checkout
ci = commit
st = status
br = branch
revert = checkout --
amend = commit --amend
amx = commit --amend
ama = commit --amend -a
curbr = "!f() { if [ ! -f .git/rebase-merge/head-name ]; then git rev-parse --abbrev-ref HEAD; else echo -n \"rb($(basename \"$(cat .git/rebase-merge/head-name)\")\"; if [ -f .git/rebase-merge/stopped-sha ]; then echo -n ',stopped'; fi; if (( $(git diff --name-only --diff-filter=U --relative | wc -l) != 0 )); then echo -n ',conflict'; fi; echo ')'; fi }; f"
root = rev-parse --show-toplevel
set-upstream = remote set-head upstream
reset-upstream = remote set-head upstream --auto
head = "!f() { if [ -z \"$1\" ]; then echo 'error: no remote specified' >&2; return 1; fi; git symbolic-ref refs/remotes/$1/HEAD; }; f"
mbr = "!f() { if ! git head upstream >/dev/null 2>&1; then git reset-upstream; fi; set -o pipefail; git head upstream | cut -f4 -d/; }; f"
fup = fetch upstream
rb = rebase
rbup = "!f() { echo \"Rebasing onto $(git mbr)\"; git rebase upstream/$(git mbr) \"$@\"; }; f"
po = push origin
pocur = !git po $(git curbr)
pofcur = !git po -f $(git curbr)
wdiff = diff --color-words
track = "!f() { if [ -z \"$1\" ]; then echo 'error: no branch specified' >&2; return 1; fi; git fetch origin $1 && git co -b $1 origin/$1; }; f"
copr = "!f() { if [ -z \"$1\" ]; then echo 'error: no PR specified' >&2; return 1; fi; git fetch upstream pull/$1/head:pr-$1; git co pr-$1;}; f"
wip = for-each-ref --sort='committerdate:iso8601' --format=' %(color:green)%(committerdate:relative)%09%(color:white)%(refname:short)' refs/heads
my = "!f() { git log --reverse --no-show-signature --format='format:%C(auto)%h %s' upstream/$(git mbr)..HEAD; echo;}; f"
vs = "!f() { up=$1; test -z \"$1\" && up=upstream/$(git mbr); echo $up; git log --reverse --no-show-signature --format='format:%C(auto)%h %s' ${up}..HEAD; echo;}; f"
unstage = restore --staged
[core]
editor = "vim +0"
excludesFile = ~/.gitignore
[merge]
conflictstyle = zdiff3
renamelimit = 4096
[push]
default = current
autoSetupRemote = true
[diff]
algorithm = histogram
colorMoved = default
colorMovedWS = ignore-space-change
[http "https://gopkg.in"]
followRedirects = true
[advice]
detachedHead = false
skippedCherryPicks = false
[rerere]
enabled = false
[gpg]
format = ssh
[gpg "ssh"]
allowedSignersFile = /home/thockin/.ssh/allowed_signers
[commit]
gpgsign = true
[tag]
gpgsign = true
[log]
showSignature = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[url "[email protected]:"]
insteadOf = "gh://"
[transfer]
fsckobjects = true
[fetch]
fsckobjects = true
[receive]
fsckObjects = true