-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
123 lines (84 loc) · 3.55 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# vim: autoindent expandtab tabstop=2 shiftwidth=2
# [ Main configs ] -------------------------------------------------------------
[core]
# Never plays with end of line character. Configure your editor to always use
# lf (\n).
autocrlf = false
eol = lf
pager = less -F -X
[user]
name = Marcelo Almeida
email = 2532492+marcelocra@users.noreply.github.com
[init]
defaultBranch = main
[push]
autoSetupRemote = true
[pull]
rebase = false
[diff]
tool = nvim -d
; submodule = log
[difftool]
prompt = false
[color]
ui = true
# [ Aliases ] ------------------------------------------------------------------
[alias]
# Diff stuff.
dw = diff --word-diff --color-words
dwm = diff --word-diff --color-words master
d = dw HEAD
ds = diff --stat # Summary of current diff.
# Other stuff.
b = branch
co = checkout
l = lol
s = status
st = status
ps = push --set-upstream
pso = push --set-upstream origin
rom = rebase origin/master
# The 'f' in the beginning stands for 'full'. So 'fd' -> 'full diff',
# piping it through less (with colors!).
fd = ! git diff --color=always | less -R
fl = ! git log --color=always | less -R
# One line colored log with date, committer and other info.
lol = log --abbrev-commit --decorate --date=relative --format=format:'%C(yellow)%h%C(reset) %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(cyan)%d%C(reset)'
# Similar to the log version above, but also shows the graph, with relative.
dag = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(yellow)%h%C(reset) %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(cyan)%d%C(reset)' --all
# The next two commands are the same as the previous two, but with date formatted differently.
lold = log --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(magenta)%aD%C(reset) %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(cyan)%d%C(reset)'
dagd = log --graph --abbrev-commit --decorate --format=format:'%C(yellow)%h%C(reset) %C(magenta)%aD%C(reset) %C(green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(cyan)%d%C(reset)' --all
gcm = credential-manager-core
# [ Configs ] ------------------------------------------------------------------
[includeIf "gitdir:~/Private/"]
path = .gitconfig.personal.gitconfig
[includeIf "gitdir:~/projects/"]
path = .gitconfig.personal.gitconfig
[includeIf "gitdir:~/projects/work/"]
path = .gitconfig.work.gitconfig
[includeIf "gitdir:/workspaces/"] # Containers.
# Loaded in this order. If work file doesn't exist, it is ignored.
path = .gitconfig.personal.gitconfig
path = .gitconfig.work.gitconfig
# [ OS specific configs ] ------------------------------------------------------
[include]
# This file should only exist in Windows systems.
path = .gitconfig.windows.gitconfig
# This file should only exist in Unix systems (Mac, Debian, Ubuntu, etc).
path = .gitconfig.unix.gitconfig
# This file should only exist in Linux systems (but not in a Mac).
path = .gitconfig.linux.gitconfig
# [ Git LFS ] ------------------------------------------------------------------
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
# [ Credential ] ---------------------------------------------------------------
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential