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
594 views
in Technique[技术] by (71.8m points)

git - How can I merge many commits, but leave one out?

Suppose I have this feature branch "foo". Now I want to merge it back into master, but I've added some debugging code that I don't want in master.

The debug code is in it's own commit, so I could use git cherry-pick on each commit and leave out this commit. But that's gonna be quite tiresome.

Is there some "inverse cherry-pick" that does this, or an interactive merge?

See Question&Answers more detail:os

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

1 Answer

0 votes
by (71.8m points)

Despite what other SCMs use it to mean, in git, git revert is an inverse cherry-pick.


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

...