-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitconfig
133 lines (113 loc) · 4.37 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
[user]
name = johannes karoff
email = [email protected]
[includeIf "gitdir:~/projects/priceloop/"]
path = ~/projects/priceloop/.gitconfig
[core]
whitespace = blank-at-eof,blank-at-eol,tab-in-indent,space-before-tab
excludesfile = ~/.gitignore_global
pager = less
[include]
path = /home/cornerman/projects/dottr/yolk/git/gitconfig
[alias]
head = rev-parse --short HEAD
cot = "!TEMP=$(mktemp -d); f() { git worktree prune && git worktree add $TEMP $1 && zsh -c \"cd $TEMP; zsh\";}; f" # checkout branch in temporary directory
un = reset HEAD
una = "!git reset HEAD $(git rev-parse --show-toplevel 2> /dev/null)"
prev = reset HEAD~1
wip = "!git cama wip"
stashu = stash save --include-untracked
f = fetch
fa = fetch --all
p = push
pt = push --tags
pta = "!git push origin \"$(git rev-parse --abbrev-ref HEAD)\" --tags"
pforce = push --force-with-lease --force-if-includes
u = pull --rebase --autostash
a = add
s = status
brancho = "!git branch --set-upstream-to \"origin/$(git rev-parse --abbrev-ref HEAD)\" \"$(git rev-parse --abbrev-ref HEAD)\""
po = "!git push --set-upstream origin \"$(git rev-parse --abbrev-ref HEAD)\""
ci = commit
cie = commit --amend
cia = commit --amend --no-edit
cm = commit -m
cam = commit -am
cama = "!git add -A; git commit -m"
br = branch
co = checkout
cob = checkout -b
abort = "!f() { git rebase --abort || git merge --abort || git cherry-pick --abort }; f"
rb = rebase
rbc = rebase --continue
rba = rebase --abort
rbs = rebase --skip
rbi = rebase -i
mrc = merge --continue
mra = merge --abort
mrs = merge --skip
cpp = cherry-pick
cpc = cherry-pick --continue
cpa = cherry-pick --abort
cps = cherry-pick --skip
dbr = "!f() { git branch -D $1 && git push origin :$1;}; f"
d = diff --irreversible-delete --find-copies-harder --find-copies --ignore-space-at-eol --ignore-space-change --ignore-all-space --inter-hunk-context=2
ds = diff --irreversible-delete --find-copies-harder --find-copies --ignore-space-at-eol --ignore-space-change --ignore-all-space --inter-hunk-context=2 --staged
dw = diff --color-words='[A-Z][a-z]*|[a-z]+|[^[:space:]]' --irreversible-delete --find-copies-harder --find-copies --ignore-space-at-eol --ignore-space-change --ignore-all-space --inter-hunk-context=2
dws = diff --color-words='[A-Z][a-z]*|[a-z]+|[^[:space:]]' --irreversible-delete --find-copies-harder --find-copies --ignore-space-at-eol --ignore-space-change --ignore-all-space --inter-hunk-context=2 --staged
loga = "!git log --pretty='%C(Yellow)%h %C(reset)%ad (%C(Green)%cr%C(reset))%x09 %C(Cyan)%an: %C(reset)%s' --date=short"
l = log
ld = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
la = log --graph --all --decorate --pretty=oneline --abbrev-commit
ls = ls-files
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
ignore = "!cd -- ${GIT_PREFIX:-.}; f() { echo \"$1\" >> .gitignore; }; f" # add to .gitignore in current directory
[color]
status = auto
interactive = auto
branch = auto
diff=auto
[push]
default = current
[pull]
ff = only
rebase = true
[cherry-pick]
ignore-space-change = true
[rebase]
autoStash = true
autoSquash = true # useful for `git commit --fixup <hash>` (https://fle.github.io/git-tip-keep-your-branch-clean-with-fixup-and-autosquash.html)
ignore-space-change = true
[diff]
ignore-space-change = true
[blame]
ignore-space-change = true
[merge]
conflictstyle = diff3 # zdiff3
ff = only
ignore-space-change = true
[rerere]
enabled = 1 # Reuse recorded resolution of conflicted merges: https://git-scm.com/docs/git-rerere
[diff]
algorithm = histogram
indentHeuristic = true
wordRegex=[A-Z][a-z]*|[a-z]+|[^[:space:]] # see camel case as separate words
[commit]
verbose = true
[apply]
ignoreWhitespace = change # do not produce whitespace conflicts
[fetch]
prune = true # remove old branches on fetch
[branch]
autosetuprebase = always
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[credential]
helper = store
[init]
defaultBranch = master