File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 185
185
staged = diff --cached
186
186
stashed = !git --no-pager stash list
187
187
tags = tag -n1 -l
188
- trash = !git restore --staged --worktree --source HEAD -- . && echo 'Trashed all changes'
189
- nuke = !git reset --hard HEAD~1 && echo 'Nuked last commit'
190
- restart = !git reset --hard @{upstream} && echo 'Restarted to upstream branch'
188
+ trash = !git restore --staged --worktree --source HEAD -- .
189
+ nuke = !git reset --hard HEAD~1
190
+ restart = !git reset --hard @{upstream}
191
191
type = cat-file -t
192
192
unstage = reset HEAD .
193
193
root = rev-parse --show-toplevel
194
194
git = !git
195
195
# inspired by https://stackoverflow.com/a/53597426
196
- amend-to = "!f() { current_branch=\"$(git rev-parse --abbrev-ref HEAD)\" && apply_to=\"$1\" && git stash --quiet && git checkout --quiet \"$apply_to\" && git stash apply --quiet && git add -u && git commit --quiet --amend --no-edit && new_sha=\"$(git log --format=\"%H\" -n 1)\" && git switch --quiet \"$current_branch\" && git rebase --quiet --onto \"$new_sha\" \"$apply_to\" && echo \"Amended changes to $apply_to\"; }; f $1"
196
+ amend-to = "!f() { current_branch=\"$(git rev-parse --abbrev-ref HEAD)\" && apply_to=\"$1\" && git stash --quiet && git checkout --quiet \"$apply_to\" && git stash apply --quiet && git add -u && git commit --quiet --amend --no-edit && new_sha=\"$(git log --format=\"%H\" -n 1)\" && git switch --quiet \"$current_branch\" && git rebase --quiet --onto \"$new_sha\" \"$apply_to\"; }; f $1"
197
+ # inspired by https://stackoverflow.com/questions/28666357/how-to-get-default-git-branch#comment126528129_50056710
198
+ origin = "!sh -c \"git switch $(LC_ALL=C git remote show origin | sed -n '/HEAD branch/s/.*: //p')\""
199
+ github = !sh -c 'ssh -T
[email protected] '
197
200
198
201
[color]
199
202
advice = true
281
284
showUntrackedFiles = all
282
285
renames = copies
283
286
287
+ [advice]
288
+ addEmptyPathspec = false
289
+ detachedHead = false
290
+
284
291
[diff]
285
292
colorMoved = default
286
293
renames = copies
You can’t perform that action at this time.
0 commit comments