-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
44 lines (37 loc) · 1.73 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
[user]
name = aymen
email = [email protected]
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[alias]
brl = !git for-each-ref --sort='-authordate' --format='%(align:50,left)%(refname)%(color:yellow bold) %(HEAD)%(end)%09%(color:reset)%(color:green)%(authordate:relative)%(color:cyan)%09%(objectname:short)%(color:reset)%09%(authorname)%(color:reset)' refs/heads | sed -e 's-refs/heads/--' | nl -w2 -d $'\n' -s') ' | head -n 15
col = !sh -c 'git checkout $(git branch-number $1)' -
del = !sh -c 'git branch -d $(git branch-number $1)' -
branch-name = "!git rev-parse --abbrev-ref HEAD"
branch-number = "!git for-each-ref --sort='-authordate' --format='%(refname)' refs/heads | sed -e 's-refs/heads/--' | tail -n +$1 | head -n 1 #"
gui = !sh -c /usr/local/opt/git/libexec/git-core/git-gui
lg = log -n 30 --color --graph --branches --all --pretty=format:'%C(cyan)%h%C(reset) -%C(bold red)%d%C(reset) %s %C(green)(%C(reset)%C(bold green)%an%C(reset)%C(green): %cr)' --abbrev-commit
amend = commit --amend --no-edit
revert = checkout --
addnw = !sh -c 'git diff -U0 -w --no-color "$@" | git apply --cached --ignore-whitespace --unidiff-zero -'
chk = checkout -b
cm = commit -m
uncommit = reset --soft HEAD^
dc = diff -- ':!*/package-lock.json' ':!*/yarn.lock'
po = !git push -u origin $(git branch --show-current)
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
side-by-side= true
line-numbers = true
[merge]
conflictstyle = diff3
[diff]
colorMoved = default