-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig2
61 lines (61 loc) · 2.79 KB
/
gitconfig2
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
[include]
path = /home/vagrant/.snowflake.gitconfig
path = /home/vagrant/.snowflake.aliases
[init]
templateDir = /home/nsemmler/.git-template
defaultBranch = main
[user]
email = [email protected]
name = Niklas Semmler
[push]
default = simple
[diff]
tool = vimdiff
[merge]
tool = vimdiff
conflictstyle = diff3
[difftool]
prompt = false
[alias]
branchlocal = "!f() { git branch --format '%(refname:short) %(upstream)' | awk '{if (!$2) print $1;}'; }; f"
vim = difftool --tool=vimdiff
amend = commit --amend
ci = commit
stat = status -s
last = log -1 HEAD -p
visual = ! gitk &
hist = log --pretty=oneline --abbrev-commit --decorate --all
history = log --pretty=oneline --abbrev-commit --decorate --all
files = log --name-only
rbco = rebase --continue
rbab = rebase --abort
rbver = rebase bptp-verified
rbmain = rebase main
rbi = "!f() { git rebase -i $(git log --invert-grep --author='Niklas Semmler' -1 --pretty="%H"); }; f"
rsthd = reset HEAD~
rst = reset
conflict = "!f() { nvim $(git diff --name-only --diff-filter=U --relative); }; f"
bptp = log --no-walk --tags='*bptp-verified' --tags='*devenv-certified*' --tags="*bptp-stable*" --pretty=format:'%h%Creset %C(yellow)%D%n%ch - %Creset%s - %cr%n' --abbrev-commit
fetchall = "!f() { git fetch origin main:main; git fetch --tags --all --force; }; 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"
update = "!f() { git fetch origin main:main; git fetch --tags --force --all; git rebase --onto bptp-verified origin/main; }; f"
rcont = "rebase --continue"
rabort = "rebase --abort"
sw = "switch"
goto = "!f() { git update-index --no-skip-worktree GSAll/.idea/compiler.xml; git checkout GSAll/.idea/compiler.xml; git update-index --skip-worktree GSAll/.idea/compiler.xml; git checkout $(git branch --sort=-committerdate | fzf | xargs); }; f"
recent = "!f() { git update-index --no-skip-worktree GSAll/.idea/compiler.xml; git checkout GSAll/.idea/compiler.xml; git update-index --skip-worktree GSAll/.idea/compiler.xml; git checkout $(git reflog | egrep -io 'moving from ([^[:space:]]+)' | awk '{ print $3 }' | awk ' !x[$0]++' | egrep -v '^[a-f0-9]{40}$' | head -n20 | fzf | xargs); }; f"
go = "!f() { git update-index --no-skip-worktree GSAll/.idea/compiler.xml; git checkout GSAll/.idea/compiler.xml; git update-index --skip-worktree GSAll/.idea/compiler.xml; git checkout $1; }; f"
[log]
abbrevCommit = true
[pull]
rebase = true
[mergetool]
keepBackup = false
[core]
excludesfile = /home/nsemmler/.gitignore
[rerere]
enabled = 1
autoupdate = true
[url "[email protected]:"]
insteadOf = "https://github.com/"