I have recently set up a git repository on bitbucket, and have added an old project onto it. I have committed and pushed a change as a test, but now I face this problem.
git rm --cached *.xcuserstate *.xcuserdata
Run the above command. Then commit, then push.
See here: Xcode says "Uncommitted Changes" Whenever I try to git pull or push
You may need to run them separately :
git rm --cached *.xcuserstate git rm --cached *.xcuserdata