最佳答案
假设我想从一个发布分支合并到主分支,而且在发布分支中有一些我不想包含在主分支中的提交。是否有办法进行合并,以便其中一个或多个提交不会被合并?
到目前为止,我的策略是做到以下几点:
git merge --no-commit release-branch
# Resolve conflicts and apply reverse patch of the commits that I don't want included
git commit # Edit commit message so that it lists the commits that have been reverse-patched
还有更好的办法吗?