-
Notifications
You must be signed in to change notification settings - Fork 3
/
gitconfig
75 lines (74 loc) · 3.49 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
[merge]
tool = vimdiff
conflictStyle = zdiff3
# [mergetool "vimdiff"]
# cmd = nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[mergetool "conflicted"]
cmd = nvim $MERGED +'call MyMerger()'
[alias]
please = push --force-with-lease
it = !git init && git commit -m “root” --allow-empty
staash = stash --include-untracked
commend = commit --amend -c HEAD
signplz = config commit.gpgsign true
shudder = !git pull && git push
rb = rebase
rbi = !sh -c \"git rebase --autosquash --rebase-merges -i `git oldest-ancestor ${1:-origin/master} HEAD`\" -
# rbp = !sh -c \"git rebase -x 'return 1' `git merge-base --fork-point ${1:-origin/master} HEAD`\" -
rbp = !sh -c \"git rebase -x 'return 1' `git merge-base --fork-point ${1:-origin/master} HEAD || git merge-base ${1:-origin/master} HEAD`\" -
rbc = rebase --continue
rba = rebase --abort
co = checkout
sta = "!f() { git stash push -m \"$(vipe <&-)\" \"$@\"; }; f"
pop = stash pop
lg = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(normal)%s%C(reset) %C(dim white)%an%C(reset) %C(dim blue)(%ar)%C(reset) %C(auto)%d%C(reset)'
oldest-ancestor = !bash -c 'diff --old-line-format= --new-line-format= <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | head -1' -
oldest-ancestor2 = !bash -c 'comm -23 <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | head -1' -
oldest-ancestor3 = !bash -c 'diff --changed-group-format=\"%<\" <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | head -1' -
oldest-ancestor4 = !bash -c 'grep -Fxf <(git rev-list --first-parent \"${1:-master}\") <(git rev-list --first-parent \"${2:-HEAD}\") | head -1' -
blg = !sh -c \"git lg $(git oldest-ancestor ${1:-origin/master})..\" -
mergedtopiclg = !sh -c \"git lg $(git oldest-ancestor $1^2 ${2:-master})..$1^2\" -
step-through = "!sh -c \"GIT_EDITOR=\\\"nvim -e -sc '%s/\\v^pick/edit' +wq\\\" git rebase --rebase-merges -i $(git oldest-ancestor ${1:-origin/master})\""
review-change = !sh -c \"nvim '+Gedit HEAD' '+Git difftool -y HEAD^' '+normal gT'\" -
# review-changes = !sh -c \"nvim \\\"+Git log -p ${1:-HEAD}\\\" \\\"+Git difftool -y ${1:-HEAD^}\\\" '+normal gT'\" -
# review-changes = !bash -c \"nvim \\\"+Git log -p ${1:-HEAD}\\\" \\\"+Git log --oneline ${1:-HEAD}\\\" \\\"+Git difftool -y ${*:-HEAD^}\\\" '+normal gT'\"
review-changes = !bash -c \"nvim \\\"+Git log ${1:-HEAD}\\\" \\\"+Git log --oneline ${1:-HEAD}\\\" \\\"+Git difftool -y ${*:-HEAD^}\\\" '+normal gT'\"
quote-string = "!read -r l; printf \\\"!; printf %s \"$l\" | sed 's/\\([\\\"]\\)/\\\\\\1/g'; printf \" #\\\"\\n\" #"
startpr = !sh -c \"git switch --guess -c $1 master\"
[push]
default = current
followTags = true
[pull]
rebase = true
# [core]
# excludesfile = ~/.gitignore
[http "https://gopkg.in"]
followRedirects = true
[rebase]
autoStash = true
updateRefs = true
[status]
showUntrackedFiles = all
[diff]
# Show whitespace errors when doing `git diff`
wsErrorHighlight = all
algorithm = histogram
[ghq]
root = ~/src
[ghq "keybase://"]
vcs = git
[ghq "ssh://[email protected]"]
vcs = git
[commit]
verbose = true
[difftool "kitty"]
cmd = kitty +kitten diff $LOCAL $REMOTE
[difftool "kitty.gui"]
cmd = kitty kitty +kitten diff $LOCAL $REMOTE
[filesystem "Oracle Corporation|1.8.0_202|/dev/mapper/pool-root"]
timestampResolution = 1001 milliseconds
minRacyThreshold = 0 nanoseconds
[rerere]
enabled = true
[init]
defaultBranch = master