-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
94 lines (72 loc) · 2.54 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
[color]
ui = true
[alias]
# add
chunkyadd = add --patch # stage commits chunk by chunk
# via http://blog.apiaxle.com/post/handy-git-tips-to-stop-you-getting-fired/
snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
snapshots = !git stash list --grep snapshot
#via http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
recent-branches = !git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short)'
last = diff HEAD^ # diff last committed change
# status
st = status
# log
l = log --all --decorate --oneline --graph
pulls = log --pretty=format:\"%h, %ci\"
changes = log --oneline --name-status
graph = log --graph --abbrev-commit --date=relative --pretty=format:'%C(yellow)%h%Creset%C(blue)%d%Creset %s %C(green)<%an>%Creset %C(blue)%ci%Creset'
# reset
unstage = reset HEAD # remove files from index (tracking)
uncommit = reset --soft HEAD^ # go back before last commit, with files in uncommitted state
filelog = log -u # show changes to a file
mt = mergetool # fire up the merge tool
cleanup = !git branch --merged | egrep -v "(main|master|develop)"
root = rev-parse --show-toplevel
[format]
; pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
[mergetool]
prompt = false
[merge]
summary = true
verbosity = 1
[apply]
whitespace = nowarn
[branch]
autosetupmerge = true
mergeoptions = --no-ff
[push]
# 'git push' will push the current branch to its tracking branch
# the usual default is to push all branches
default = upstream
[core]
autocrlf = false
editor = nvim
commitGraph = true
pager = delta ; brew install git-delta
[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
algorithm = patience
; tool = vimdiff
; @seet https://github.com/dandavison/delta
[delta]
; syntax-theme = Dracula
; features = side-by-side line-numbers decorations
; whitespace-error-style = 22 reverse
; hunk-header-style = omit
side-by-side = true ; side by side view with line-wrapping
line-numbers = true ; adds line numbers
navigate = true ; use n and N to move between diff sections
[interactive]
diffFilter = delta --color-only
[hub]
host = github.com
protocol = ssh
[init]
defaultBranch = main
[include]
path = .gitconfig.user