Git ignore UserInterfaceState.xcuserstate
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"
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.