-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
64 lines (60 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[init]
defaultBranch = main
templatedir = ~/.git_template
[push]
default = current
[color]
ui = true
[alias]
# Basic Git commands
st = status
aa = add --all
ap = add --patch
ci = commit -v
co = checkout
pf = push --force-with-lease
pl = pull
ps = push
# Branch management
br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
gbinfo = for-each-ref --sort=-committerdate refs/heads/ --format='%(color:yellow)%(refname:short)%(color:reset) - %(color:green)%(committerdate:short)%(color:reset) - %(color:blue)%(authorname)%(color:reset) - %(contents:subject)'
cleanBranches = !sh -c 'git branch --merged | grep -v "main\\|master\\|dev\\|*" | xargs git branch -D'
# Log commands
lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30
log = 'git --no-pager log'
glg = log --graph --oneline --all
# Diff commands
gdf = diff --color-words --word-diff=color
gdfc = diff --color-words --word-diff=color -U3
# Other useful commands
undo = reset HEAD~1 --mixed
res = !git reset --hard
done = !git push origin HEAD
save = !git add -A && git commit -m 'chore: commit save point'
del = branch -D
[core]
excludesfile = ~/.gitignore
autocrlf = false
longpaths = true
eol = lf
editor = nano
[merge]
ff = only
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[rebase]
autosquash = true
[include]
path = ~/.gitconfig.local
[diff]
colorMoved = zebra
[user]
name = Jesús Erro
email = olagato@gmail.com
[credential]
helper = store
[safe]
directory = /home/jesus/proyectos/nges
directory = /home/jesus/proyectos/docker