-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
50 lines (47 loc) · 1.74 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
[user]
name = Fabio Zuber
email = fabio.zuber92@gmail.com
[push]
default = upstream
[pull]
rebase = true
[core]
excludesfile = /home/fabio/.gitignore_global
pager = diff-so-fancy | less --tabs=4 -RFX
[merge]
tool = nfugitive
[mergetool "nfugitive"]
cmd = nvim -f -c "Gdiff" "$MERGED"
[color "diff"]
meta = "yellow bold"
commit = "green bold"
frag = "magenta bold"
old = "red bold"
new = "green bold"
whitespace = "red reverse"
[color "diff-highlight"]
oldNormal = "red bold"
oldHighlight = "red bold 52"
newNormal = "green bold"
newHighlight = "green bold 22"
[init]
defaultBranch = main
templatedir = ~/.config/git/git-templates
[alias]
co = checkout
# Pretty git log: https://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
# Interactively rebase all the commits on the current branch
rebase-branch = "!git rebase -i `git merge-base master HEAD`"
# remove ignored files from index
# From https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore
remove-ignored = "!git ls-files --ignored --exclude-standard -z | xargs -0 git rm --cached"
[rebase]
autosquash = true
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f