简体   繁体   English

在xCode中使用Git Merge冲突

[英]Git Merge Conflict in xCode

I'm using (for the first time) Git as a source control of my iOS project. 我正在使用(第一次)Git作为我的iOS项目的源代码控件。 We are two persons working on this project. 我们是这个项目的两个人。 Everything was ok until the day that we modified the same file (different methods and lines). 在我们修改相同文件(不同的方法和行)之前,一切都很好。 So when I want to commit my modification xcode tell me to pull first, because my co-worker already committed his work. 因此,当我想提交我的修改时,xcode告诉我先拉,因为我的同事已经完成了他的工作。 when I pulled I lost my local modifications. 当我拉我失去了我的本地修改。

To face this problem, what are the steps to make ? 要面对这个问题,要采取的步骤是什么?

Thanks 谢谢

You'd be better off using a feature branch workflow. 您最好使用功能分支工作流程。 http://git-scm.com/book/en/Git-Branching-Branching-Workflows http://git-scm.com/book/en/Git-Branching-Branching-Workflows

This will allow you and your colleague to work on the same files with fairly little fuss. 这将允许您和您的同事处理相同的文件,相当简单。 Share branches at your own risk! 分享分支机构需要您自担风险!

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

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