Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
94 views
in Technique[技术] by (71.8m points)

Autoremove temporal commits from Git

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...