-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecutable_dot_gitconfig
More file actions
126 lines (117 loc) · 3.43 KB
/
executable_dot_gitconfig
File metadata and controls
126 lines (117 loc) · 3.43 KB
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
[user]
name = Brian Gray
email = 638937+brianmgray@users.noreply.github.com
[push]
default = tracking
[credential]
helper = osxkeychain
[alias]
# convenience
m = checkout main
ms = checkout master
# shortcuts
co = checkout
ci = commit
ca = commit --amend
cm = commit -m
cam = commit -am
caa = commit -a --amend
st = status
br = branch
r = rebase
rc = rebase --continue
ra = rebase --abort
chp = cherry-pick
chpc = cherry-pick --continue
chpa = cherry-pick --abort
bs = bisect start
bg = bisect good
bb = bisect bad
br = bisect reset
# fugu
cbr = "!git branch | egrep '^\\s*(bp|mike|jasonL|daisy)/' | xargs -I {} sh -c 'echo Deleting branch: {}; git branch -D {}'"
# useful
cog = "!git_cog() { git co $(git branch | grep "$1" | head -n 1); }; git_cog"
rfp = "!f() { set -x; git rebase --onto "$1" HEAD~$(( $2 + 1 )); }; f"
addg = "!f() { git ls-files | grep \"$1\" | xargs git add; git st; }; f"
exg = "!f() { pattern=\"$1\"; shift; cmd=\"$1\"; shift; git ls-files | grep -E \"$pattern\" | xargs -r git $cmd \"$@\"; git st;}; f"
cot = "!f() { git co $1 -f && pnpm install && pnpm run dev; }; f"
d = "!f() { git diff "$@" -- . :^pnpm-lock.yaml; }; f"
dc = d --cached
dp = d HEAD~1 HEAD
dp2 = d HEAD~2 HEAD~1
rtrack = !git checkout --track -b $1 origin/$1
unstage = restore --staged
unchange = restore
reseto = !git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)
fa = !git config --list | grep alias | grep
curbranch = name-rev --name-only HEAD
find = !git branch -r | grep
type = cat-file -t
dump = cat-file -p
undo = reset --soft HEAD~1
adda = !git add -A . && git status
a- = !git add -A . && git status
lreset = !git reset HEAD $1 && git checkout -- $1 && git clean -fd
pushall = !git push --all origin && git push --follow-tags
pushr = push -u origin HEAD
pushf = push --force-with-lease
tbd = for-each-ref --sort=taggerdate --format '%(refname) %(taggerdate)' refs/tags
rdel = push origin --delete
remote-merged = !git-remote-merged-branches
remote-notmerged = !git-remote-notmerged-branches
rgrep = !git branch -r | grep
epatch = !git diff > changes.patch
prlog = !git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" --reverse | tee /dev/tty | pbcopy
bg = !git branch | grep
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# Pretty log output
hist = log --graph --pretty=format:'%Cred%h%Creset %s%C(yellow)%d%Creset %Cgreen(%cr)%Creset [%an]' --abbrev-commit --date=relative
# plugins
# mv-changes <src-sha> <dest-sha> <path>
mv-changes = !mv-changes
[core]
excludesfile = ~/.gitignore.global
preloadindex = true
fscache = true
editor = /usr/bin/vim
[color]
branch = auto
diff = auto
status = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
tool = opendiff
[diff]
tool = opendiff
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[pager]
branch = false
[rerere]
enabled = true
autoupdate = true
[pull]
rebase = true
[rebase]
autosquash = true