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.
Each time I try to Pull, Push, or Merge I get this error message:
"The working copy 'Project_Name' has uncommitted changes".
And I have committed this change several times:
EDIT: I did 'git status' and got the following:
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Crunch.xcodeproj/project.xcworkspace/xcuserdata/Neil.xcuserdatad/UserInterfaceState.xcuserstate
#
no changes added to commit (use "git add" and/or "git commit -a")
Help would be greatly appreciated, SirKaydian
I'm unfamiliar with the
.xcuserstate
file, but it sounds like a user-specific file. Generally user-specific files have no business in source control. They change frequently, generally are binary and thus difficult to diff, and aren't helpful to other users. Try closing down your IDE then running the commands or try adding this file name to your.gitignore
file.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 :
Okay, turns out I just had to make a comment
And commit that. Now it works fine. This must have just been some strange bug.
Thanks for the help though, SirKaydian
I solved this problem by:
Do not use the --force flag unless you’re absolutely sure you know what you’re doing.
Step 1:
Step 2: