gitconfig: Add aliases push-softly, stash-bttf, rebase-c
This commit is contained in:
parent
695985746e
commit
f1c6dceb42
1 changed files with 8 additions and 0 deletions
|
|
@ -67,12 +67,20 @@
|
|||
# Push with ci.skip option (probably only works with GitLab)
|
||||
push-skip-ci = push -o ci.skip
|
||||
|
||||
# Push with --force-with-lease, like force push but less risky. Should be used after a rebase.
|
||||
push-softly = push --force-with-lease
|
||||
|
||||
# "back to the future": switch to default branch and pull
|
||||
# TODO: Add `git stash push/pop`, but only if there actually is something to stash... not quite sure how
|
||||
bttf = "!f() { DEFAULT=$(git default-branch); git switch ${1-$DEFAULT} && git pull --rebase --prune; }; f"
|
||||
stash-bttf = !git stash && git bttf && git stash pop
|
||||
|
||||
# Reset HEAD to last commit, but keep files as they are
|
||||
uncommit = reset HEAD~1 --mixed
|
||||
|
||||
# Shortcut for rebase --continue
|
||||
rebase-c = rebase --continue
|
||||
|
||||
# Stash changes, pull and pop stash again
|
||||
stash-pull = !git stash && git pull && git stash pop
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue