不能推,拉或合并git."工作副本有一些未经修改的变化"

Nei*_*eil 8 git xcode repository bitbucket ios

我最近在bitbucket上建立了一个git存储库,并在其上添加了一个旧项目.我承诺并推动改变作为测试,但现在我面临这个问题.

每次我尝试拉,推或合并我收到此错误消息:

工作副本

"工作副本'Project_Name'具有未提交的更改".

我已多次承诺这一改变:

该文件似乎被命名为:用户界面状态


编辑:我做'git status'并得到以下内容:

# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   Crunch.xcodeproj/project.xcworkspace/xcuserdata/Neil.xcuserdatad/UserInterfaceState.xcuserstate
#
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)

谢尔迪安爵士,非常感谢帮助

小智 15

步骤1:

git rm --cached ProjectName.xcodeproj/project.xcworkspace/xcuserdata/username.xcuserdatad/UserInterfaceState.xcuserstate
Run Code Online (Sandbox Code Playgroud)

第2步:

git commit -m "Removed file that shouldn't be tracked"
Run Code Online (Sandbox Code Playgroud)