解决eclipse+git中每次clean项目需要重新commit文件

使用.gitignore文件避免每次clean项目需要重新commit文件(XX.xcodeproj/project.xcworkspace/xcuserdata/XX.xcuserdatad/UserInterfaceState.xcuserstate),但是没有效果,网上查到需要执行:

git rm --cached XX.xcodeproj/project.xcworkspace/xcuserdata/XX.xcuserdatad/UserInterfaceState.xcuserstate

git commit -m "Removed file that shouldn't be tracked"

 

同时,在.gitignore文件中加入如下几行:

*.xcuserstate

project.xcworkspace

xcuserdata

UserInterfaceState.xcuserstate 

project.xcworkspace/

xcuserdata/

UserInterface.xcuserstate

原文地址:https://www.cnblogs.com/badwood316/p/4642483.html