xcode 无法执行操作,因为“PROJECTNAME”存在一个或多个树冲突
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16356528/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The operation could not be performed because "PROJECTNAME" has one or more tree conflicts
提问by Tony Pham
I am using Git and when I tried to pull a newer development branch with my current branch using XCode's source control menu I received this error message:
我正在使用 Git,当我尝试使用 XCode 的源代码管理菜单使用当前分支拉取更新的开发分支时,我收到了以下错误消息:
The operation could not be performed because "ProjectName" has one or more tree conflicts.
How do I resolve these tree conflicts? Thanks
如何解决这些树冲突?谢谢
采纳答案by GayleDDS
There is a conflict in the project file you need to pull using the command line or a GUI tool like SourceTree (Free) and manually resolve the conflict in a text editor or diff tool.
您需要使用命令行或 GUI 工具(如 SourceTree(免费))提取的项目文件中存在冲突,并在文本编辑器或差异工具中手动解决冲突。
See also:How to use Git properly with XCode?
另请参阅:如何在 XCode 中正确使用 Git?
回答by lynulzy
I was in trouble with this problem. It often happens when I remove or change the directory
of the project .For example, when I move one directory into another existing directory,both of the directory are real folder the warning will exist.
我遇到了这个问题。当我删除或更改directory
项目时经常发生这种情况。例如,当我将一个目录移动到另一个现有目录时,这两个目录都是真实的文件夹,警告将存在。
In fact the meaning of tree conflict
is that the directory level in your work repository is not same as it was on server.
实际上的意思tree conflict
是工作存储库中的目录级别与服务器上的目录级别不同。
It's my way to resolve this problem :
这是我解决这个问题的方法:
- Check which directory in your local work repository differs from the server repository.
- If the local repository has extra directory Delete(local) -> update ->OK ,
if the local repository lacks of something and the extra elements in server is needless, Delete (server) -> update.
NOTE
After this the tree conflict is not existing any more.
- 检查本地工作存储库中的哪个目录与服务器存储库不同。
- 如果本地仓库有多余的目录 Delete(local) -> update ->OK ,如果本地仓库缺少东西并且 server 中的额外元素是不需要的,则删除 (server) -> update。
NOTE
在此之后,树冲突不再存在。
Hope helps.
希望有所帮助。
回答by kometen
I had a similar issue. So I opened a terminal-windows and changed to the directory, verified my branch was clean with a git status
, changed to master using git checkout master
?and merged my branch with git merge push-notifications
. The Git Branching - Basic Branching and Mergingpage explains it in detail.
我有一个类似的问题。所以我打开了一个终端窗口并切换到目录,用 验证我的分支是干净的git status
,使用git checkout master
?更改为 master并将我的分支与git merge push-notifications
. 在Git的分支-基本分支与合并页解释得很详细。
回答by turingtested
For me this error occurred when Xcode got confused on which branch the project was currently on. So I solved it by switching the branch to master and then back to the former branch again. So, try this simple fix first.
对我来说,当 Xcode 对项目当前所在的分支感到困惑时,就会发生这个错误。所以我通过将分支切换到 master 然后再次回到以前的分支来解决它。所以,首先尝试这个简单的修复。
回答by Hymansonsox
My situation. Merging the master branch with minor changes into my current in-development or working version. I solved this issue by:
我的情况。将带有细微更改的 master 分支合并到我当前的开发中或工作版本中。我通过以下方式解决了这个问题:
- Moving the in-development file with the tree conflict to my desktop (i.e. out of the repository controlled directory).
- Committing the most in-development version.
- Re-execute the merge from the master into the most recent version.
- Resolved actual merge conflicts.
- Confirmed that the file that was merged from main into the in-development branch was there and correct.
- 将具有树冲突的开发中文件移动到我的桌面(即从存储库控制的目录中移出)。
- 提交最新的开发版本。
- 重新执行从 master 到最新版本的合并。
- 解决了实际的合并冲突。
- 确认从 main 合并到开发中分支的文件在那里并且正确。