-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
152 lines (141 loc) · 7.11 KB
/
gitconfig
File metadata and controls
152 lines (141 loc) · 7.11 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
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
[user]
name = Ryan Herbst
email = rherbst@slac.stanford.edu
[core]
excludesfile = ~/.gitexcludes
filemode=true
[branch]
#autosetuprebase = always
[status]
submodulesummary = 1
[alias]
# Simple commands
co = checkout
br = branch
ci = commit
st = status
cp = cherry-pick
last = log -1 HEAD
unstage = reset HEAD --
dt = difftool
mt = mergetool
# Roll back a file easily
prevision = "!f() { git checkout `git log --oneline $2 | awk -v commit = "$1" 'FNR == -commit+1 {print $1}'` $2;} ;f"
# I like to merge without committing right away
# This doesn't seem to work
merge = merge --no-commit
# Save everything but then hard reset to current head
# Can then recover the changes using reflog
wipe = "!f() { git add -A && git commit -qm'WIPE SAVEPOINT' && git reset ${1-HEAD~1} --hard;};f"
# Special log aliases
hist = "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --name-status
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --date=short
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cgreen\\ [%cn]" --decorate --date=relative
le = log --oneline --decorate
la = "!git config -l | grep alias | cut -c 7-"
filelog = log -u
dlc = diff --cached HEAD^
changes = !git log --name-status HEAD..
# Find files and strings
find = "!git ls-files | grep -i"
grep = grep -Ii
#Submodule aliases
sdiff = !git diff && git submodule foreach 'git diff'
spush = push --recurse-submodules=on-demand
strack = ! git submodule foreach -q --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo master)'
spull = !git pull --recurse-submodules && git submodule sync --recursive && git submodule update --init --remote --recursive --rebase && git strack
#Subtree aliases
sta = "!f() { git subtree add --prefix $2 $1 ${3-master} --squash;};f"
stu = "!f() { git subtree pull --prefix $2 $1 ${3-master} --squash;};f"
stp = "!f() { git subtree push --prefix $2 $1 ${3-master};}f"
filter-empty-commits = filter-branch -f --tag-name-filter cat --commit-filter 'git_commit_non_empty_tree "$@"'
largest-files = !git rev-list --objects --all | grep \"$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -50 | awk '{print$1}')\"
largest-files-bare = !git rev-list --objects --all | grep \"$(git verify-pack -v objects/pack/*.idx | sort -k 3 -n | tail -50 | awk '{print$1}')\"
cleanup = ! git reflog expire --expire=now --all && git gc --prune=now
rst = !git reset --hard origin/main && git checkout main && git pull --rebase
pre-rst = !git reset --hard origin/pre-release && git checkout pre-release && git pull --rebase
mst-rst = !git reset --hard origin/master && git checkout master && git pull --rebase
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
[push]
#recurseSubmodules = on-demand
[fetch]
recurseSubmodules = on-demand
[pull]
#rebase = preserve
[merge]
keepBackup = false
tool = p4merge
[mergetool]
prompt = false
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
submodule = log
tool = p4merge
[difftool]
prompt = false
[difftool "p4merge"]
cmd = p4merge "$LOCAL" "$REMOTE"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[gui]
#[include]
# path = /afs/slac/g/reseng/git/group-config
[safe]
directory = /amaroq/hass
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/dace/dace
directory = /afs/slac.stanford.edu/g/reseng/smartsheets/tid-id-smartsheets
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/tid-id-smartsheets
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/rogue_p10
directory = /afs/slac.stanford.edu/u/ey/rherbst/.linux_settings
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/ESROGUE-607
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/surf
directory = /afs/slac.stanford.edu/u/ey/rherbst
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/ucsc/
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/ucsc/ucsc-hn/
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/ucsc/ucsc-hn
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/ucsc/ucsc-hn/firmware/submodules/rce-gen3-fw-lib
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/ucsc/ucsc-hn/firmware/submodules/ruckus
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/ucsc/ucsc-hn/firmware/submodules/surf
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/aes-stream-drivers
directory = /afs/slac.stanford.edu/u/ey/rherbst/temp/aes-stream-drivers_new
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/snl-trans-FES
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/snl-trans-FES/firmware/submodules/surf
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/snl-trans-FES/firmware/submodules/ruckus
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/rogue
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/aires-conda-recipes
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/warm-tdm
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/darpa-accel-llrf-phase-1p5/firmware/submodules/axi-soc-ultra-plus-core
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/darpa-accel-llrf-phase-1p5/firmware/submodules/surf
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/darpa-accel-llrf-phase-1p5
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/surf
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/rce-gen3-fw-lib
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/Simple-Kria-Kv260-Example
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/Simple-Kria-Kv260-Example/firmware/submodules/surf
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/Simple-Kria-Kv260-Example/firmware/submodules/ruckus
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/axi-soc-ultra-plus-core
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/Simple-Kria-Kv260-Example/firmware/submodules/axi-soc-ultra-plus-core
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/rogue_v6
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/gen_daq/rogue-base-docker
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/smurf/pysmurf
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/smurf/smurf-rogue-docker
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/smurf/smurf-roguev6-docker
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/smurf/amc-carrier-core
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/smurf/cryo-det
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/tid-id-xilinx-dockers
directory = /afs/slac.stanford.edu/u/ey/rherbst/projects/cryo-det
directory = /afs/slac.stanford.edu/g/reseng/vol10/hwdb
[credential]
helper = "!f() { echo username=slacrherbst; echo \"password=$GITHUB_TOKEN\"; };f"
[push]
default = matching