Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't exclude user interface state from commit in xcode

Tags:

I can't exclude user interface state file from commit.

Every time I'm trying to push to github it asks me to commit first and insert user interface state file into the changes (even if I didn't move the mouse or interface at all it still is shown to commit!).

I tried different methods, described in other similar topics. For example, I tried to add all possible cases of user interface into the .gitignore in root, like this:

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

It didn't work. I tried to clean the cache and reset git, didn't help.

Git status command says the following: "modified: .xcodeproj/project.xcworkspace/xcuserdata/.xcuserdatad/UserInterfaceState.xcuserstate"

And it looks like this

Please help (it is driving me crazy)!

like image 742
titicaca Avatar asked Jun 26 '13 06:06

titicaca


People also ask

How do I ignore UserInterfaceState Xcuserstate?

In SourceTree, right click on the xcuserstate file and choose “Ignore…”. Select “Ignore exact filename” and for Add this ignore entry to, select “This repository only”. Delete the file from the repo also.

Where is Gitignore file Xcode?

Go to gitignore.io, enter Xcode in the search field, and click the Create button. You will get a git ignore file with a list of file types that git should ignore.

What is UserInterfaceState Xcuserstate?

1, UserInterfaceState. xcuserstate's are binary-formatted plist files that can exist in either of project files or workspace files. They are user-specific and many can be present in a given Xcode project or workspace.


1 Answers

If those files are already committed, you need to remove them from the index before seeing your .gitignore file work.

git rm --cached *.xcuserstate # or git rm -r --cached project.xcworkspace 
like image 98
VonC Avatar answered Sep 20 '22 21:09

VonC