简体   繁体   English

我们可以在已经与 master 合并的分支上提交吗?

[英]Can we commit on branch that's already been merged with master?

I have a branch, say " XYZ ", I worked and did a few commits on that branch and later merged it with my master branch.我有一个分支,比如说“ XYZ ”,我在那个分支上工作并做了一些提交,然后将它与我的主分支合并。 Now, I want to do some more changes in my code and want to use that same branch.现在,我想对我的代码进行更多更改并希望使用相同的分支。 I have not deleted the branch.我没有删除分支。

Can I use the same branch again?我可以再次使用同一个分支吗? Can I then merge the new commits with master again?然后我可以再次将新提交与 master 合并吗? Or is the only solution to create another branch?或者是创建另一个分支的唯一解决方案?

You can still work on that branch as it still exists.您仍然可以在该分支上工作,因为它仍然存在。

The git-merge documentation says: git-merge文档说:

Incorporates changes from the named commits (since the time their histories diverged from the current branch) into the current branch.将来自命名提交的更改(从它们的历史从当前分支开始)合并到当前分支中。

You can continue working on your branch and then when you merge with master again, it will bring the commits that are missing on master.您可以继续在您的分支上工作,然后当您再次与 master 合并时,它将带来 master 上缺少的提交。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何知道一个分支是否已经合并到 master 中? - How can I know if a branch has been already merged into master? 显示对主题分支的唯一更改(即使它已经合并到母版中) - Show unique changes to topic branch (even if it's already been merged to master) 已经与master合并的分支中的错误如何解决? - How to fix a bug in a branch after it has already been merged with master? 从已推送的合并分支恢复特定提交 - Revert a specific commit from a merged branch that has already been pushed 如何重做已经合并到另一个分支中的提交 - How to rework a commit that has already been merged in an another branch 如何验证git项目的release分支的修补程序已全部合并到master中? - How can I verify that a git project's release branch's fixes have all been merged into master? 如何将远程主服务器重置回尚未与git中的另一个分支合并的提交 - How to reset remote master back to a commit which has not been merged with another branch in git 如何从Git的master分支中排除特定合并分支的提交? - How to exclude a specific merged branch's commit from the master branch in Git? Git:如何删除已经提交,推送并合并到master的分支? - Git: How do I remove a branch that has already been committed, pushed, and merged into master? 处理向功能添加新迷你功能的正确方法,哪个分支已合并到主服务器中 - The right way to handle adding new mini-features to a feature, which branch has already been merged into master
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM