This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
177 lines (149 loc) · 5.61 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
[alias]
aa = "add ." # All all
ai = "! git ls-files -m -o --exclude-standard | fzf --reverse --height 10 --print0 -m | xargs -0 -t -o git add -f" # https://spin.atomicobject.com/2018/04/05/fuzzy-find-git-add/
aic = "! git ai && git c"
b = "! echo $(git branch --show-current)" # Show the current branch.
c = commit -v
ca = "! function f() { git aa && git commit -v; }; f"
cb = "! git b | pbcopy" # Copy the current branch to the clipboard.
clear = clean -df # Just remove new files
cm = "! function f() { git mod && git commit -v; }; f"
co = checkout
cs = commit # Commit staged
cwb = "worktree add"
d = diff
db = "! function f() { git branch -D $1; git push origin :$1 ;}; f" # Delete branch.
di = "! git ls-files -m -o --exclude-standard | fzf --reverse --height 10 --print0 -m | xargs -0 -t -o git diff" # Interactive diff.
dm = "diff"
ds = diff --staged
dt = "! function f() { git tag -d $1; git push origin :refs/tags/$1; }; f"
f = "fetch"
fb = "! /bin/bash -c 'source /Users/aubreypwd/Repos/github.com/aubreypwd/zsh-plugin-fzf-git-branch/fzf-git-branch.plugin.zsh && fzf-git-branch'" # See https://github.com/aubreypwd/zsh-plugin-fzf-git-branch
force = "force --force-with-lease" # Check for staleness first.
g = gui
ga = "! function f() { git add . && git g; }; f" # Add all files and open the GUI.
get = "! function f() { ghq get \"$1\"; }; f" # Commit all files, add message inline, and push.
gh = "! function f() { gh \"$@\"; }; f"
ghget = "! function f() { ghq get \"[email protected]:$1/$2.git$1\"; }; f"
l = log --oneline --decorate --graph # Better log, looks better in CLI.
l1 = l -n 1
l5 = l -n 5
l10 = l -n 10
l20 = l -n 20
l50 = l -n 20
l100 = l -n 20
lg = "! function f() { lazygit; }; f"
lgnt = "! function f() { ttab -w -t 'lazygit' -q 'lazygit && exit'; }; f"
m = merge
mod = "add -u" # Add modifed
mt = "! function f() { git dt $1; git tag $1; git push --tags; }; f" # Move tag here.
nb = checkout -b # New branch
p = pull
pb = "! git push -u origin \"$(git rev-parse --abbrev-ref HEAD)\"" # git push current branch.
pew = "! function f() { git commit -a --allow-empty-message -m '' && git pb; }; f" # Push an empty commit with all updates (dependant in other packages).
pp = pb
pt = push --tags
ui = ! git diff --name-only --cached | fzf --reverse --height 10 --print0 -m | xargs -0 -t -o git restore --staged # Un-stage interactively.
rcob = "! function f() { git rhhc && git fb && git pull; }; f" # Reset and checkout branch.
rhh = reset --hard HEAD # Reset easily.
rhhc = "! git rhh && git clear" # Reset and remove new files.
us = "rm --cached" # Un-stage a file
s = status
sa = "rebase --root -i" # Squash all
sco = "sparse-checkout set" # Sparse checkout, list folders
scor = "sparse-checkout disable" # Backout of a Sparce Checkout (reset)
sd = "! function f() { git status && git diff ;}; f"
sds = "! function f() { git status && git diff --staged ;}; f"
smerge = "! function f() { smerge ./ -b; }; f" # Sublime Merge
stat = status
stow = "stash --all push -m"
uaf = "reset" # Unstage all files.
pl = "! function f() { git -C wp-content/plugins $@; }; f" # Runs command in the wp-content/plugins directory (useful with LocalWP site shell).
[push]
default = current
autoSetupRemote = true
[user]
name = Aubrey Portwood
email = [email protected]
signingkey = 8691F6F5E25C5E23
[core]
excludesfile = /Users/aubreypwd/.gitignore
[core]
editor = "micro --clipboard external --infobar false --keepautoindent false --savecursor false --diffgutter false --colorcolumn 72 --ruler false --softwrap true --wordwrap true --eofnewline false --rmtrailingws true"
# editor = open -W -a 'CommitEdit'
# editor = "/Applications/Komet.app/Contents/MacOS/Komet"
[color]
ui = true
diff = auto
status = auto
branch = auto
interactive = auto
pager = true
[credential]
helper = osxkeychain
[color]
diff = auto
status = auto
branch = auto
interactive = auto
ui = true
pager = true
[color "status"]
added = green
changed = red bold
untracked = magenta bold
[color "branch"]
remote = yellow
[gui]
tabsize = 2
warndetachedcommit = true
[diff]
noprefix = true
[difftool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args \"$LOCAL\" \"$REMOTE\"
[pager]
diff = false
show = false
[mergetool "sublime"]
cmd = subl -w $MERGED
trustExitCode = true
[mergetool "smerge"]
cmd = smerge mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\"
trustExitCode = true
[mergetool "meld"]
cmd = open -W -a Meld --fresh --new --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
trustExitCode = true
[mergetool]
keepBackup = false
[merge]
tool = vscode
summary = true
[pull]
rebase = false
[ghq]
root = ~/Repos
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[diff "plist"]
textconv = plutil -convert xml1 -o -
[commit]
verbose = true
gpgsign = true
[rerere]
enabled = true
[branch]
sort = -committerdate
[column]
ui = auto
[maintenance]
repo = /Users/aubreypwd/Repos/github.com/awesomemotive/affiliate-wp
auto = false
strategy = incremental
[mergetool "vscode"]
cmd = "code --new-window --wait --disable-extension shevaua.phpcs --merge $REMOTE $LOCAL $BASE $MERGED" # 3-way merge.