-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitconfig
46 lines (46 loc) · 1.77 KB
/
dot_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
[alias]
co = checkout
cob = checkout -b
cm = !git add -A && git commit -m
cln = !git checkout . && git clean -fd
s = status
save = !git add -A && git commit -m 'SAVEPOINT'
undo = reset HEAD~1 --mixed
ir = "!git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o -I{} git rebase -i {}~1"
nlog = !git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
fixup = "!git add -A && git log -n 50 --pretty=format:'%h %s' --no-merges | fzf | cut -c -7 | xargs -o git commit --fixup"
fpush = push --force-with-lease
# List all branches which are merged into the current branch
lob = "!f(){ git branch --merged | grep -v -e 'master$' | grep -v -e 'develop$' | grep -v '*'; };f"
# Delete all branches which are merged into the current branch
dob = "!f(){ git branch --merged | grep -v -e 'master$' | grep -v -e 'develop$' | grep -v '*' | xargs git branch -D; };f"
# List all tracked branches which are deleted (squashed and deleted in my work case)
lsb = "!f(){ git fetch --prune && git branch -vv | grep ': gone' | awk '{print $1}'; };f"
# Delete all tracked branches which are deleted (squashed and deleted in my work case)
dsb = "!f(){ git fetch --prune && git branch -vv | grep ': gone' | awk '{print $1}' | xargs git branch -D; };f"
[core]
autocrlf = input
editor = nvim
[credential]
helper = /usr/local/share/gcm-core/git-credential-manager
[diff]
algorithm = histogram
[init]
defaultBranch = main
[branch]
sort = -committerdate
[fetch]
prune = true
[merge]
conflictStyle = zdiff3
keepBackup = false
[push]
autoSetupRemote = true
default = simple
[rebase]
autosquash = true
[rerere]
enabled = true
[user]
name = Pascal Mathys
email = pascal.mathys@rootix.ch