-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
117 lines (115 loc) · 3.65 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
112
113
114
115
116
117
[core]
editor = nvim
autocrlf = false
symlinks = true
longPaths = true
excludesfile =
pager = delta
[user]
name = Joe Schr
email = [email protected]
[user]
name = Joe Schr
email = [email protected]
[push]
autoSetupRemote = true
default = simple
[alias]
ap = add --patch
br = branch
ca = !git ci --amend
cc = cim
ce = commit -C HEAD --amend
ci = commit -v
cim = !git ci -m
df = !git diff --histogram && git diff --histogram --cached
dft = difftool
dlog = -c diff.external=difft log -p --ext-diff
feat = merge --no-ff --no-commit
go = checkout
# rebase taking all remote changes
# ours is remote, theirs is local
pl = pull --rebase -s recursive -X ours
ps = push
;reflog
re = !gitk --all --date-order $(git log -g --pretty=%H)
ri = rebase --interactive
rr = rebase --continue
sh = stash save
st = status
type = cat-file -t
dump = cat-file -p
; delete remote branch
branch-delete-remote = push --delete
delete-remote-branch = push --delete
# Push the new branch, set local branch to track the new remote
ps--set-upstream = push --set-upstream origin
unadd = reset HEAD
unstage = reset
uncommit = reset --soft HEAD^
staged = diff --cached
ctags = "!.git/hooks/ctags"uncommit = reset HEAD^
stash-rename = "!_() { rev=$(git rev-parse $1) && git stash drop $1 || exit 1 ; git stash store -m \"$2\" $rev; }; _"
stash-all = stash -u
# shorthands
gbdr = branch-delete-remote
rmdb = branch-delete-remote
# logging commands (hardcoded PAGER because of nvimpager not working)
lg-paged = !"PAGER=/usr/bin/less git log"
# pretty format
his = lg-paged --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h:%C(reset) %C(white)%s%C(reset) %C(auto)%d%C(reset) | %C(bold green)[%ar]%C(reset) %C(dim white)%an%C(reset)'
# long pretty format
lgl = his --pretty=\"%C(bold green)[%h:%ar]%C(reset) %an %d%n%s%n%w(72,4,4)%b\" --date=short --graph --decorate
lg = !git his --decorate --graph # full short log
l5 = !git his -5 # log only the last five commits
lgs = !git l5 # log only the last five commits
lst = !git lg --stat # log including which files changed
lpa = !git lg -p # log including every individual changed line
ldf = !git lg -p # log including every individual changed line
last = !git lgl -1 --patch # show everything about the head commit
lgh = !git lgl -1 --stat
gov = lg --simplify-by-decoration # show relationships between branches
lga = !git his --all
gl = lg
# show stats and last 5 commits
st = !"git lgs; git status"
# file logging commands
lf = !git his --follow -- # commits including desired files
lfl = !git lgl --follow -- # long-format commits
lfst = !git lst --follow -- # stat-style commits
lfpa = !git lpa --follow -- # full patch commits
show-file-history = !git lfl
[rerere]
enabled = true
[mergetool]
keepTemporaries = false
prompt = false
[merge]
; conflictStyle = zdiff
conflictstyle = diff3
[http]
sslVerify = false
cookiefile = C:/Users/Joe/AppData/Roaming/.home/.gitcookies
[winUpdater]
recentlySeenVersion = 2.15.1.windows.2
[branch]
autosetuprebase = always
[help]
autocorrect = 20
[pull]
rebase = merges
autostash = true
[credential "https://github.com"]
helper = !/usr/bin/gh auth git-credential
[init]
defaultBranch = main
[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
[diff]
colorMoved = default
[rebase]
autoStash = true