[英]Github Windows Client merge failure
We currently have 2 developers working on a project and use Github and the Github-Client for Windows. 目前,我们有2个开发人员在一个项目上工作,并使用Github和Windows的Github-Client。
The basic idea being, 2 branches for development, which are then pushed to pre_production and then tested in the pre_production server; 基本思想是2个开发分支,然后将其推送到生产前,然后在生产前服务器中进行测试; then when everything is working fine, pushed to master. 然后当一切正常时,将其推向高手。
I'm not sure if the above is the correct workflow, as I'm pretty new to Git. 我不确定以上内容是否正确,因为我对Git还是很陌生。 Anyway, we were testing the workflow and we did the following steps: 无论如何,我们正在测试工作流程,并执行以下步骤:
It worked fine up to this point. 到目前为止,一切正常。 Then when we tried to merge the changes made by dev2 into dev1 it failed while syncing local dev_1 with remote dev_1 (at step 5). 然后,当我们尝试将dev2所做的更改合并到dev1中时,在将本地dev_1与远程dev_1同步时失败了(在第5步)。
As we are new to Git, it would be great to have some help. 由于我们是Git的新手,所以能获得一些帮助将非常棒。
Ok looks like I found the answer to my question. 好的,看来我找到了问题的答案。
In step 5, instead of trying to 'sync' the local_dev and the remote_dev, we simply forced a push to the remote_dev. 在第5步中,我们没有尝试“同步” local_dev和remote_dev,而是简单地强制推送到remote_dev。 We can do this safely as the local_dev will have the latest changes and not the remote one. 我们可以安全地执行此操作,因为local_dev将具有最新更改,而不是远程更改。
Did it using the below command: 是否使用以下命令:
git push git_url local_branch:remote_branch git push git_url local_branch:远程分支
Hope this helps someone. 希望这对某人有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.