-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig.symlink
92 lines (87 loc) · 3.46 KB
/
gitconfig.symlink
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
# vi:ft=gitconfig
[color]
ui = auto
[push]
default = upstream
[core]
excludesfile = ~/.gitignore_global
crlf = input
[include]
path = ~/.local_gitconfig
[alias]
blog = !git -C ${GIT_PREFIX:-.} log --graph --date=relative --format=eevans ${GIT_MAINLINE:-master}...HEAD
bdiff = !git -C ${GIT_PREFIX:-.} diff ${GIT_MAINLINE:-master}...HEAD
up = !git pull --all --rebase --prune $@ && git submodule sync --recursive && git submodule update --init --recursive
out = !git fetch && git log origin/${GIT_MAINLINE:-master}..
in = !git fetch && git log ..origin/${GIT_MAINLINE:-master}
bl = branchless
# Adapted from: https://harrow.io/blog/effortlessly-maintain-a-high-quality-change-log-with-little-known-git-tricks/
changelog = notes --ref=changelog append
logchanges = log --pretty='format:%N(%h)%n' --show-notes=changelog
changelog-init = !git config --add remote.origin.push '+refs/notes/changelog:refs/notes/changelog' && git config --add remote.origin.fetch '+refs/notes/changelog:refs/notes/changelog'
a = add
b = branch
c = commit --verbose
ci = commit --verbose
ca = commit --verbose --all
cm = !git checkout ${GIT_MAINLINE:-master} --ignore-other-worktrees
co = checkout --ignore-other-worktrees
d = diff --histogram --submodule=diff
db = !git branch -d $(git branch --merged=${GIT_MAINLINE:-master} | grep -v "\\*" | grep -v "${GIT_MAINLINE:-master}")
dv = !git diff -w "$@" | view -
fap = fetch --all --prune
is-ancestor = "!f() { git merge-base --is-ancestor $1 HEAD; }; f"
lgg = log --graph --decorate
lgga = log --graph --decorate --all
glog = log --graph --date=relative --format=eevans
p = push --prune
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive --autosquash --no-keep-empty
rbm = !git rebase ${GIT_MAINLINE:-master} --interactive --autosquash --no-keep-empty
st = status
unwip = "!git log -n 1 | grep -q -c -- "--wip--" && git reset HEAD~1 && if which git-branchless; then git bl hide HEAD@{1}; fi"
unpushed = !GIT_CURRENT_BRANCH=$(git name-rev --name-only HEAD) && git log origin/$GIT_CURRENT_BRANCH..$GIT_CURRENT_BRANCH --pretty=eevans
w = worktree
wip = "!f() { git add -A && git ls-files --deleted -z | xargs -r0 git rm && git commit -m \"--wip-- $@\" --no-verify --no-gpg-sign;}; f"
serve = !git daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/
developer-level = !git shortlog -sn --no-merges | awk '{$1 = int(log($1) / log(2))}1'
karma = !git shortlog -sn --merges | awk '{$1 = int(log($1) / log(2))}1'
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[pretty]
eevans = %C(auto)%h %C(yellow)(%G?) %C(auto)- (%ad) %C(white)%s%C(auto) %C(bold blue)<%an>%C(auto)%d
[mergetool "fugitive"]
cmd = nvim -c \"Gvdiff!\" \"$MERGED\"
[merge]
tool = fugitive
ff = false
[pull]
ff = true
rebase = true
[transfer]
fsckObjects = true
[protocol]
version = 2
[core]
pager = delta
[delta]
syntax-theme = gruvbox-dark
line-numbers = true
side-by-side = true
navigate=true
hyperlinks = true
hyperlinks-file-link-format = "vscode://file/{path}:{line}"
[interactive]
diffFilter = delta --color-only
[diff]
colorMoved = default
[rerere]
enabled = true
[branch]
sort = -committerdate
[url "git@personal.github.com"]
insteadOf = git@github.com