-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
77 lines (77 loc) · 2.62 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
[user]
name = Gert Van Gool
email = [email protected]
[color]
ui = auto
[color "branch"]
current = "#2aa198 reverse"
local = "#2aa198"
remote = "#859900"
[color "interactive"]
meta = "#b58900 bold"
frag = "#d33682 bold"
old = "#dc322f bold"
new = "#859900 bold"
whitespace = "#dc322f reverse"
[color "status"]
added = "#b58900"
changed = "#859900"
untracked = "#2aa198"
[alias]
ci = commit
s = status -s
st = status
co = checkout
ba = branch -a
pp = "!git pull --rebase && git push"
git = !git
gh = !gh
pr = !gh pr
log1 = log --pretty=oneline --abbrev-commit
changelog = "!git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:\" * %s\""
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; $EDITOR `f`"
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
edit-modified= "!f() { git ls-files --modified | sort -u ; }; $EDITOR `f`"
add-modified= "!f() { git ls-files --modified | sort -u ; }; git add `f`"
add-empty-dirs = "!f() { for dir in `find $@ -type d -empty`; do echo \"*\n!.gitignore\" > $dir/.gitignore; git add $dir/.gitignore; done }; f"
rm-deleted = "!git rm $(git status | grep deleted | cut -f 2 -d ':' | sed 's/ //g')"
tag-date = !GIT_COMMITTER_DATE=$(git show --format=%aD | head -1) git tag
b = branch -vvv
l = log --pretty=oneline --abbrev-commit
update-main = "!test \"$(git branch --show-current)\" = \"$(git main-branch-name)\" && git merge origin/$(git main-branch-name) --ff-only || git fetch . origin/$(git main-branch-name):$(git main-branch-name)"
main-branch-name = "!f() { \
git_heads_dir=\"$(git rev-parse --show-toplevel)/.git/refs/heads\" ; \
if [ -f \"${git_heads_dir}/main\" ] ; then \
echo 'main'; \
elif [ -f \"${git_heads_dir}/master\" ] ; then \
echo 'master'; \
else \
git remote show origin | grep 'HEAD branch' | sed -e 's/HEAD branch://g' -e 's/ //g'; \
fi \
}; f"
diff-branch-only = !git diff $(git merge-base $(git branch --show-current) $(git main-branch-name)) $(git branch --show-current)
[push]
default = current
autoSetupRemote = true
[core]
autocrlf = input
[diff]
renames = copies
mnemonicprefix = true
[diff "gpg"]
textconv = gpg -v
xfuncname = "^((pub|uid) .*)"
[branch]
autosetupmerge = true
autosetuprebase = always
[url "https://github.com/"]
insteadOf = "gh:"
[url "https://github.com/"]
insteadOf = "ghg:"
[url "https://github.com/"]
insteadOf = "git://github.com/"
[url "[email protected]:"]
insteadOf = "ghp:"
[init]
defaultBranch = main