xcode git无法从远程存储库中提取更改 [英] xcode git unable to pull changes from the remote repository

查看:188
本文介绍了xcode git无法从远程存储库中提取更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在与另一名开发人员开发iPhone应用程序。我们的git仓库位于远程服务器上。



因此,我们正在处理我们的工作副本,然后我们一个接一个地进行提交,工作副本与服务器和相互同步。



一切正常,直到今天。其他开发人员成功地将他的更改推送到远程存储库,现在轮到我了:提交,从远程存储库中提取更改,或许将它们合并,然后将我的工作副本推送到服务器。



但是,当我试图拉动更改(使用xcode的内置git)时,出现错误:
操作无法执行,因为%reponame%有一个或多个树冲突

请引导我解决这个问题的过程。并且,请提供有用的提示,以避免将来出现此问题。 解决方案

我猜xcode使用选项来强制快进合并从存储库中提取时。这不是个坏主意,因为它可以防止你进行不必要的合并。



尝试使用 git pull --rebase (请选中xcode中的某个复选框),它应该删除您的更改,下载新版本并将删除的更改应用回来。冲突将发生在最后一步,因此您将解决它并再次提交更改。然后你可以将它们推到服务器上。


I'm developing an iPhone application with another developer. Our git repository is situated on the remote server.

So we are working with our working copies and then we do commit, pull, push one by one and we get our local working copies synchronized with server and with each other.

Everything worked fine until this day. Other developer successfully pushed his changes to the remote repository, and now it is my turn: commit, pull changes from the remote repository, maybe merge them somehow and then push my working copy to the server.

But when I'm trying to pull changes (using xcode's built-in git) I'm getting an error: "The operation could not be performed because "%reponame%" has one or more tree conflicts".

Please, guide me through the process of solving this problem. And, please, provide useful tips to avoid this problem in future.

解决方案

I guess xcode uses option to force fast-forward merges when pulling from repository. That is not bad idea, becouse it prevents you from undesired merges.

Try to use git pull --rebase (resp. check some appropriate checkbox in xcode), it should remove your changes, download new version and then apply your removed changes back. Conflict will occur at the last step so you will solve it and commit that changes again. Then you can push them on server.

这篇关于xcode git无法从远程存储库中提取更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆