我有“develop”和“InitialPomChanges”分支。我想将开发分支的所有内容复制到InitialPomChanges分支。
假设您想用开发中的内容覆盖 InitialPomChanges 的所有内容(即您希望 InitialPomChanges 的内容与开发中的内容完全匹配),请执行以下操作:
git checkout InitialPomChanges
git checkout develop . #copies the contents of develop into the working directory
git commit -am "Making InitialPomChanges match develop"
这将使 InitialPomChanges 中的最后一次提交与开发中的最后一次提交相匹配。为了使两个分支之间的未来合并更容易,现在最好做一个git merge develop
.
或者,如果您想更改 InitialPomChanges 的内容并在一次提交中进行合并,您可以执行以下操作:
git checkout InitialPomChanges
git merge -s theirs develop
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)