When encountering this problem, we should first determine two things:

One. Did you write the.gitignore file. Git has a.gitignore configuration file that allows you to set files to be ignored. If you write a small script in your project and want to use it for your own use instead of submitting it to remote management, you can configure it in the.gitignore file. We usually ignore some files for a particular project, so just add this file to the code directory in the project. After you confirm that the file exists and add the following ignore information, it is time to clear the cache.

*.xcuserstate project.xcworkspace xcuserdata UserInterfaceState.xcuserstate project.xcworkspace/ xcuserdata/ UserInterface.xcuserstate

2. Because the project. Xcworkspace xcuserdata/username. Xcuserdatad/userinterfacestate xcuserstate file has emerged, So we’re going to have to clean this cache file so that this file doesn’t show up every time, so to clean this cache, you can use the command line

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

Or find your project directory project directly. Xcworkspace, due to the project. The xcworkspace is a package files, directly display package content, find UserInterfaceState. Xcuserstate moved to the trash can.

Then turn on your changes, commit, push. The process of change, the best xcode exit, you avoid deleting UserInterfaceState xcuserstate after production, to ignore failure.

Author: not snowy source: CSDN, blog.csdn.net/lixuezhi86/…