当我做git状态时,我得到了这个结果:
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
# (use "git push" to publish your local commits)
#
# Changes not staged for commit:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: OnlineMarketing/OnlineMarketing-Info.plist
# deleted: OnlineMarketing/icon-100.png
# deleted: OnlineMarketing/icon-1024.png
# deleted: OnlineMarketing/icon-144.png
# deleted: OnlineMarketing/icon-152.png
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# OnlineMarketing.xcodeproj/project.xcworkspace/xcshareddata/
# OnlineMarketing.xcodeproj/project.xcworkspace/xcuserdata/alexgenadinik.xcuserdatad/
# OnlineMarketing.xcodeproj/xcuserdata/alexgenadinik.xcuserdatad/
# OnlineMarketing/.DS_Store
# OnlineMarketing/Default-568h@2x copy.png
我的问题是我应该如何处理来自xcode的这些iOS未跟踪文件?它们似乎是项目文件。我应该承诺吗?或者他们应该留在我当地?
我试图解决这个问题的原因是我试图与另一个分支合作,我得到了这个错误:
git checkout -b vidals-mods origin/vidals-mods
error: The following untracked working tree files would be overwritten by checkout:
OnlineMarketing.xcodeproj/project.xcworkspace/xcshareddata/OnlineMarketing.xccheckout
Please move or remove them before you can switch branches.
谢谢!
答案 0 :(得分:1)
结果说
您修改了项目信息plist并删除了这些图标文件
如果您运行项目并且这些文件与计算机环境相关,则有些文件会自动更改。可以安全地忽略这些xcuserdata
。不需要提交它们。
我认为你有Default-568h@2x.png
。在这种情况下,不需要提交Default-568h@2x copy.png
以太。
无需在此处提交未跟踪的文件。
What should Xcode 5 gitignore file include?
How do I remove local (untracked) files from my current git branch?