Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot push, pull or merge git. "Working copy has uncommited changes"

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 "" has uncommitted changes.

"The working copy 'Project_Name' has uncommitted changes".

And I have committed this change several times:

The file seems to be named: User Interface State


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

like image 774
Neil Avatar asked Aug 10 '12 22:08

Neil


2 Answers

Step 1:

git rm --cached ProjectName.xcodeproj/project.xcworkspace/xcuserdata/username.xcuserdatad/UserInterfaceState.xcuserstate

Step 2:

git commit -m "Removed file that shouldn't be tracked"
like image 116
Gangcil Avatar answered Oct 15 '22 04:10

Gangcil


Okay, turns out I just had to make a comment

//THIS IS A TEST

And commit that. Now it works fine. This must have just been some strange bug.

Thanks for the help though, SirKaydian

like image 22
Neil Avatar answered Oct 15 '22 03:10

Neil