简体   繁体   English

使用 git 将 dev 分支合并到 master 问题中

[英]Merge dev branch into master issue with git

I'm still relatively new to version control and thought I was being clever with the following.我对版本控制还是比较陌生,并认为我在以下方面很聪明。 I was updating a CodeIgniter site to version 3 from 2. I branched master to CI_UPGRADE_3, did the upgrade the merged back to master.我正在将 CodeIgniter 站点从 2 更新到版本 3。我将 master 分支到 CI_UPGRADE_3,将合并的升级到 master。

It broke.它坏了。 The system folders files had the old and new entries in the files.系统文件夹文件在文件中有旧条目和新条目。 I managed to get back to "pre" merge and am now in my CI_UPGRADE_3 branch wondering how I get back to master with the version on CI_UPGRADE_3.我设法回到“预”合并,现在在我的 CI_UPGRADE_3 分支中,想知道如何使用 CI_UPGRADE_3 上的版本回到 master。

Any advice would be greatly appreciated.任何建议将不胜感激。

Thanks谢谢

What probably happened is someone else commited things on master while you were working.可能发生的情况是其他人在您工作时向 master 提交了一些事情。

No other possibilies: merge master into your branch, fix the conflicts and integrate the other modifications.没有其他可能性:将 master 合并到您的分支中,修复冲突并集成其他修改。

Then, when all looks ok on your branch, merge it into master.然后,当您的分支上一切正常时,将其合并到 master 中。 It should be a fast forward, and thus master will have exactly what you had on your branch.它应该是一个快进,因此master 将拥有您在分支上拥有的内容。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM