.gitignore
文件中添加了.xcuserstate
忽略,之后每次push
时文件改动中还是会出现UserInterfaceState.xcuserstate
文件,下面是解决方法。
- 打开终端,
cd
到你的项目文件夹下,然后输入以下命令。
git status
- 然后会显示
UserInterfaceState.xcuserstate
文件有改动,这时候复制modified:
后面的地址:
- 接着输入
git rm --cached 刚才复制的地址
,如下
git rm --cached client_swift_fm_a/client_swift_fm_a.xcworkspace/xcuserdata/Jonzzs.xcuserdatad/UserInterfaceState.xcuserstate
- 接着将代码提交推送到服务器:
git commit -m "删除xcuserstate文件" git push