-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
executable file
·118 lines (114 loc) · 3.31 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
118
[user]
email = rphoenix@uw.co.uk
name = Rob Phoenix
[alias]
s = status -s
c = commit -v
# Commit all changes
ca = !git add -A && git commit -av
# fix commit
fc = !git add -A && git commit --amend --no-edit && git push origin
a = add -v
aa = add --all
p = push
po = push origin
pof = push origin --force-with-lease
pom = push origin main
pl = pull --rebase
sync = pull --rebase origin
f = fetch
fu = fetch upstream
m = merge
h = reflog
co = checkout
cn = checkout -b
cl = clone
bs = branch --sort=-committerdate
rp = remote prune
tags = tag
stashes = stash list
stash-all = stash save --include-untracked
unstage = reset -q HEAD --
discard = checkout --
uncommit = reset --mixed HEAD~
recommit = commit --amend
unmerged = diff --name-only --diff-filter=U
unmerge = reset --merge
unrevert = reset --hard HEAD^
rs = remote -v
cp = cherry-pick
new = !git init && git symbolic-ref HEAD refs/heads/main
# rebase
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Interactive rebase with given hash
ri = rebase -i
rca = commit --amend '-S'
rc = rebase --continue
# delete remote branch
dr = push origin --delete
# delete local branch
dl = branch -D
# Remove branches that have already been merged with main
# a.k.a. ‘delete merged’
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# Remove all local branches, except main
# a.k.a. ‘delete local branches’
dlb = "git branch | grep -v 'main' | xargs git branch -D"
# simple log
l = log --graph --decorate --pretty=oneline --abbrev-commit
ll = log --graph --abbrev-commit --date=relative --pretty=format:'%C(yellow)%h%Creset %C(cyan)%cr%C(green) %an %Creset-%C(auto)%d %s'
lw = log --abbrev-commit --date=relative --pretty=format:'%C(yellow)%h%Creset %C(cyan)<%cr>%C(green) %an %Creset-%C(auto)%d %s'
lp = log -p
lk = log --pretty=format:"%h - %an, %ar : %s" $1..HEAD
llk = "!l() { git log --pretty=format:'%C(yellow)%h%Creset - %C(green)%an %C(cyan)(%cr)%Creset: %s' $1..HEAD; }; l"
# Color graph detailed log view
gl = log --graph --color --decorate --stat --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"
[color]
ui = true
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
conflictStyle = diff3
[help]
autocorrect = 1
[core]
editor = nvim
excludesfile = ~/.gitignore
trustctime = false
autocrlf = false
pager = delta
[github]
user = robphoenix
[commit]
gpgsign = false
verbose = true
[push]
default = current
followTags = true
autoSetupRemote = true
[status]
showUntrackedFiles = all
[http]
cookiefile = /home/rob/.gitcookies
[rebase]
autoStash = true
[pull]
rebase = true
[url "git@github.com:"]
insteadOf = https://github.com/
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[filter "strongbox"]
clean = strongbox -clean %f
smudge = strongbox -smudge %f
required = true
[diff "strongbox"]
textconv = strongbox -diff
[init]
defaultBranch = main