Git ignore UserInterfaceState.xcuserstate

Using Terminal

Open Terminal and run these command lines in your git repo:

git status //to get the file path
git rm --cached ProjectName.xcodeproj/project.xcworkspace/xcuserdata/<my_username>.xcuserdatad/UserInterfaceState.xcuserstate
git commit -m "Removed file that shouldn't be tracked"

Using SourceTree

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.

Like what you read? Give Van Du Tran a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.