Can’t ignore UserInterfaceState.xcuserstate

Git is probably already tracking the file.

From the gitignore docs:

To stop tracking a file that is currently tracked, use git rm –cached.

Use this, replacing [project] and [username] with your info:

git rm --cached [project].xcodeproj/project.xcworkspace/xcuserdata/[username].xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"

Alternatively you can use the -a option to git commit that will add all files that have been modified or deleted.

Once you’ve removed the file from git, it will respect your .gitignore.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)