Akin to fixup! <commit>
with --autosquash
, is there some magic temp! <desc>
keyword with --autodrop
to drop temporary commits?
My use-case is temporal overriding of dependencies in a Pull Request, but ensuring that these changes are automatically removed upon rebasing. For example:
git status
520a4b3 (HEAD) fixup! aeb663d
b7150d2 temp! switch dep to dev branch
aeb663d Add smart cookie merge logic
git rebase -i --autosquash --autodrop aeb663d^
pick aeb663d Add smart cookie merge logic
fixup 520a4b3 fixup! aeb663d
drop b7150d2 temp! switch dep to dev branch
question from:
https://stackoverflow.com/questions/65888121/autoremove-temporal-commits-from-git 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…