-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
111 lines (98 loc) · 3.44 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
[core]
editor = /usr/bin/nvim
[user]
name = Sebastian Oeste
email = [email protected]
[color]
ui = auto
# pager = no
[color "branch"]
current = green bold
local = white bold
remote = yellow bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[alias]
# add
a = add # add
chunkyadd = add --patch # stage commits chunk by chunk
# branch
b = branch -v # branch (verbose)
# commit
c = commit -m # commit with message
ca = commit -am # commit all with message
ci = commit # commit
amend = commit --amend # ammend your last commit
ammend = commit --amend # ammend your last commit
# checkout
co = checkout # checkout
# cherry-pick
cp = cherry-pick -x # grab a change from a branch
# diff
d = diff # diff unstaged changes
dc = diff --cached # diff staged changes
# log
log = log --all --decorate --graph --date=short
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(auto)%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(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
l = log
last = log --stat -1
ls = log --stat
changes = log --name-status
short = log --pretty=format:\"%h %cr %cn %Cgreen%s%Creset\"
changelog = log --pretty=format:\" %C(white bold) * [%ad]%Creset %C(green)%s%Creset\"
# rebase
ri = rebase --interactive
rc = rebase --continue # continue rebase
rs = rebase --skip # skip rebase
# reset
unstage = reset HEAD -- # remove files from index (tracking)
#uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
mt = mergetool # fire up the merge tool
# stash
ss = stash # stash changes
sl = stash list # list stashes
sa = stash apply # apply stash (restore changes)
sd = stash drop # drop stashes (destory changes)
# status
s = status # status
st = status # status
stat = status # status
# tag
t = tag -n # show tags with <n> lines of each tag message
# svn helpers
svnr = svn rebase
svnd = svn dcommit
svnl = svn log --oneline --show-commit
# yolo
yolo = ! git commit -am \"$(curl -s whatthecommit.com/index.txt)\"
[format]
pretty = format:%C(red bold)%h%Creset -%C(yellow bold)%d%Creset %C(white bold)%s %C(green bold)(%ar)%Creset %C(blue bold)[%an]%Creset
[merge]
summary = true
verbosity = 1
[apply]
whitespace = nowarn
[branch]
autosetupmerge = true
[push]
# 'git push' will push the current branch to its tracking branch
# the usual default is to push all branches
default = tracking
[core]
autocrlf = false
editor = nvim
#pager = nvim -R
[advice]
statusHints = false
[diff]
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches
mnemonicprefix = true
[rerere]
enabled = true
[init]
defaultBranch = main