search

Home  >  Q&A  >  body text

ios - 通过Git 提交含有workspace的 Xcode工程文件,会出现workspace无法加载工程文件

  1. 通过Git提交含有workspace的Xcode的工程文件出现冲突

  2. 出现需要选择"keep Xcode version 和revert弹出框"

  3. 选择revert之后,workspace无法加载Xcode工程文件

  4. 选择keep version之后代码并没有更新成功~

天蓬老师天蓬老师2867 days ago759

reply all(4)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:30:33

    That is, the record of the file added by the person you are working with is not recorded in your project file, so the file cannot be found when running.
    The solution is to use git to compare your two project files and then modify the conflicts. Keywords

    git  diff  project1  project2
    然后找出来冲突解决就好了。

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:30:33

    I have never used the version management that comes with xcode. It is all managed manually from the command line. workspaceWhen adding files, there will be a string of identification codes for division. In addition to the problems of multi-person collaboration, both parties If you add the same file at the same time, it is easy to have such a situation when merging. This situation is really annoying. You can only delete it manually and then add it. So it is best to agree not to add the same file. Generally speaking, add different files. There will be no problems with the files.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:30:33

    The problem of file conflict does occur when multiple people collaborate. workspaceYou need to select the "keep Xcode version and revert pop-up box". This is because xcode found that git modified the code you are editing and asked you to make a choice

    The solution to this problem is to use the .ignore file in your project directory to ignore and submit conflicting user files in the workspace.

    There may be some details in the specific operation, which are difficult to describe, but it is recommended to use the git controller that comes with xcode, and this problem will basically not occur.

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:30:33

    After adding it to git ignore, you still need to remove that file, so git will not track it.

    Our project also has a workspace, and project files sometimes conflict. We have two solutions: 1. Open the conflicting file with a text editor and delete the conflicting lines; 2. When resolving the conflict, directly use the other party's version of the project file. In this way, you will find that some of the files you just added are lost. Manually add it again to add back the lost files...

    reply
    0
  • Cancelreply