-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
47 lines (47 loc) · 1.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
[user]
email = [email protected]
name = Niklas Semmler
editor = vim
[push]
default = simple
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
line-numbers = true
side-by-side = false
[diff]
tool = vimdiff
[merge]
tool = vimdiff
conflictstyle = diff3
[difftool]
prompt = false
[alias]
vim = difftool --tool=vimdiff
ci = commit
stat = status -s
last = log -1 HEAD -p
visual = ! gitk &
[log]
abbrevCommit = true
[pull]
rebase = true
[alias]
hist = log --pretty=oneline --abbrev-commit --graph --decorate --all
history = log --pretty=oneline --abbrev-commit --graph --decorate --all
ci = commit
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ \\\"$`echo $VAR`\\\" = '$OLD' ]]; then export $VAR='$NEW'; fi\" $@; }; f"
lastbranch = "!f() { git reflog | grep -o \"checkout: moving from .* to \" | sed -e 's/checkout: moving from //' -e 's/ to $//' | awk '!x[$0]++' | head -10; }; f"
pushnew = "!f() { git push --set-upstream origin $(git branch --show-current); }; f"
fetchpr = "!sh -c 'if [ $# -ne 2 ]; then echo \"<pr> <branch>\"; return; fi; PR=$1; BRANCH=$2; git fetch upstream pull/$PR/head:$BRANCH; git checkout $BRANCH;' -"
getmaster = "!f() { git checkout master && git fetch upstream master && git rebase upstream/master; }; f"
[mergetool]
keepBackup = false
[credential]
helper = cache --timeout=360000
[init]
defaultBranch = main