-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig
58 lines (58 loc) · 1.99 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
# This is Git's per-user configuration file.
[user]
name = Sergio Christian Siccha
email = [email protected]
[init]
# will only work once I have git >= 2.28
defaultBranch = main
#templatedir = ~/.git_template
[alias]
# create
cr = switch -c
sw = switch
st = status
stu = status -uno
shownames = show --name-only
lognames = log --name-only
ln = log --oneline --decorate --max-count=8
co = checkout
ci = commit
cif = commit --fixup
cim = commit -m
cp = cherry-pick
patch = add -p
update = pull --ff-only
# Ehm, what do ${1:+ and ${1:- do again?
# ${1:+ means something like 'if 1st arg exists then'
# ${1:- means something like 'if 1st arg NULL then'
# The trailing # is a safety measure
restructure = "! git rebase -i ${1:+HEAD~}${1:-origin/mainline} || git rebase -i ${1:+HEAD~}${1:-origin/alpha} || git rebase -i ${1:+HEAD~}${1:-upstream/master} || git rebase -i ${1:+HEAD~}${1:-upstream/main} || git rebase -i ${1:+HEAD~}${1:-origin/main} || git rebase -i ${1:+HEAD~}${1:-origin/master} #"
# This will reformat the last commit via clang-format
clang-format = "! git diff -U0 --no-color HEAD^ | clang-format-diff -i -p1"
ccontinue = cherry-pick --continue
rcontinue = rebase --continue
fixme = grep -n --color=auto --break --ignore-case -e 'FIXME*'
todo = grep -n --color=auto --break --ignore-case -e 'TODO*'
dag = log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)%an <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order
[core]
editor = nvim
excludesfile = ~/.gitignore
pager = less -FMRiX
[push]
default = simple
[diff]
tool = vimdiff
[rebase]
# Use automatic placement and marking of commits that start with "fixup!" or
# "!squash"
autosquash = true
[advice]
detachedHead = false
[color]
ui = auto
# reuse recorded resolution
# During rebase, no need to repeat the same conflict resolution over and over
# https://git-scm.com/book/en/v2/Git-Tools-Rerere
# http://git-scm.com/docs/git-rerere
[rerere]
enabled = true