-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
39 lines (39 loc) · 1.18 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
[user]
name = Laurent Dang
email = dang.laurent@gmail.com
[alias]
co = checkout
default-branch = "!f() { if $(git rev-parse --verify master > /dev/null 2>&1); then echo master; else echo main; fi }; f"
fix = commit -a --amend
fixup = "!git commit --fixup $(git log -v $(git rev-parse --abbrev-ref HEAD) ^origin/$(git default-branch) | fzf | cut -d' ' -f1)"
fresh = "!f() { git checkout $(git default-branch) && git pull origin $(git default-branch) && git checkout -b \"$1\"; }; f"
branch-name = "!git rev-parse --abbrev-ref HEAD"
publish = "!git push -u origin $(git branch-name)"
clean-branches = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
tophat = "!f() { git fetch origin \"$1\" && git checkout \"$1\"; }; f"
[color]
diff = auto
status = auto
branch = auto
ui = true
[core]
excludesfile = /Users/haeky/.gitignore
editor = vim
autocrlf = input
commitGraph = true
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%an, %cr)%Creset
[push]
default = matching
[pull]
rebase = true
[diff]
algorithm = patience
[protocol]
version = 2
[gc]
writeCommitGraph = true
[rebase]
autosquash = true