1.打开终端(Terminal),进入项目目录下

Last login: Sun Aug 13 13:38:10 on ttys001

xilanglangdeMacBook-Pro:~ xinshaofeng$ cd /Users/xinshaofeng/Work/Found 

xilanglangdeMacBook-Pro:Found xinshaofeng$ ls

Found Podfile README.md

Found.xcodeproj Podfile.lock

Found.xcworkspace Pods

2.在终端输入:

git rm --cached [YourProjectName].xcodeproj/project.xcworkspace/xcuserdata/[ YourUsername].xcuserdatad/UserInterfaceState.xcuserstate

xilanglangdeMacBook-Pro:Found xinshaofeng$ git rm --cached Found.xcodeproj/project.xcworkspace/xcuserdata/xinshaofeng.xcuserdatad/UserInterfaceState.xcuserstate

rm 'Found.xcodeproj/project.xcworkspace/xcuserdata/xinshaofeng.xcuserdatad/UserInterfaceState.xcuserstate'

3.在终端键入  git commit -m "Removed file that shouldn't be tracked"

xilanglangdeMacBook-Pro:Found xinshaofeng$ git commit -m "Removed file that shouldn't be tracked"

[master fc0601e] Removed file that shouldn't be tracked

 2 files changed, 4 insertions(+)

 delete mode 100644 Found.xcodeproj/project.xcworkspace/xcuserdata/xinshaofeng.xcuserdatad/UserInterfaceState.xcuserstate

xilanglangdeMacBook-Pro:Found xinshaofeng$ 

4.重新打开Xcode commit, push

 

相关文章:

  • 2021-07-24
  • 2022-12-23
  • 2022-02-07
  • 2021-08-17
  • 2021-12-17
  • 2021-09-11
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-06-25
相关资源
相似解决方案