Boomerange
Boomerange

Reputation: 665

The working copy <Project name> failed to commit files. - The repository has an uncompleted operation

I've just updated my Xcode from 6 to 7 (and code from Swift 1.2 to Swift 2.0) and try to create new branch in Xcode. After that I can't push my code to Bitbucket.

Is there a way how can I delete repository from directory and setup Bitbucket again and maybe push to another (a new one) repository? Fix of this problem will be great, but I will be satisfied even with move to another repository.

Upvotes: 14

Views: 9529

Answers (4)

coderChrisLee
coderChrisLee

Reputation: 299

When I am merging from currentBranchA into branchB, I got conflicts,I didn't want to solve the conflicts immediately and quit the merging process. But when I try to merge again, the Xcode shows "The working copy is currently in the middle of another operation..."

I opened the terminal ,cd to the project directory, and check the git status:

git status

it shows:

On branch currentBranchA
Your branch is up to date with 'origin/currentBranchA'.

All conflicts fixed but you are still merging.
  (use "git commit" to conclude merge)

Just do it as it says. Continue to input

git commit and click Ctrl + C to close the commit message window.

The problem will be zero.

Upvotes: 1

Boomerange
Boomerange

Reputation: 665

The problem was with installation of GitHub. I had a master repository. After reinstall and resetup everything works like before.

EDIT: For anyone who has a problem with Xcode and GIT I have a best advice. Don't use it. Use for example Source Tree

When you start developing for a living, you are gonna have to use more reliable solution for GIT. Imagine you have 70 branches. Using Source Tree you can easily solve conflicts and other things about working in team. Xcode GIT solution is not reliable and you are gonna be only frustrated.

Upvotes: 0

Nikolay Suvandzhiev
Nikolay Suvandzhiev

Reputation: 9055

In my case I ran git status which revealed that You are currently bisecting. (I was doing a bisect and must had forgotten to reset). I did a git bisect reset and attached the head to my latest commit and it was all fine afterwards.

Upvotes: 2

SarahD
SarahD

Reputation: 223

I had this error in xcode 7.1 on a year old project that was working fine. In my case I have a project with the default local repository created by xcode. For anyone who is not going to re-install and re-setup. It is possible to find out what the dangling command is and fix it from command line.

To find the dangling command Open Terminal from the project directory:

xcrun git status

In my case the status returned:

On branch master You are currently rebasing. (all conflicts fixed: run "git rebase --continue")

To fix the problem I used:

xcrun git rebase --skip

Upvotes: 20

Related Questions