5

We are using Qooxdoo framework in our application. For now, it's copy is stored in our Git repository in the root folder "qooxdoo". We have decided to replace that with submodule pointing directly to GitHub Qooxdoo repository, so we can checkout new versions in future more easily.

I created branch for these changes based on master, called qooxdoo-update. Removed old folder completely and added submodule for qooxdoo.

git rm -r qooxdoo
git submodule add git://github.com/qooxdoo/qooxdoo.git qooxdoo

So far this works pretty good. However problem arise when I want to merge master into this branch to keep it updated till other developers can test their code againts new version.

While still in qooxdoo-update branch I issue command:

git merge origin/master

CONFLICT (file/directory): There is a directory with name qooxdoo in origin/master. Adding qooxdoo as qooxdoo~HEAD

then...

git status
Unmerged paths: (use "git add/rm ..." as appropriate to mark resolution)

   added by us:        qooxdoo

running...

git rm qooxdoo
qooxdoo: needs merge
rm 'qooxdoo'
Unlink of file 'qooxdoo' failed. Should I try again? (y/n)

or...

git add qooxdoo
error: unable to index file qooxdoo
fatal: updating files failed

So i am not really sure how to resolve that conflict to successfully finish merging.

3
  • 1
    If you run git mergetool it should give you the option of taking theirs or keeping yours IIRC. mergetool is usually the easiest way of resolving conflicts. Commented Dec 7, 2012 at 13:30
  • Yeah, i know about, but that's doesn't solve a thing. I have here also the TortoiseGit and tried resolving conflict there, but ended with same error messages. Commented Dec 7, 2012 at 14:59
  • Possible duplicate of git error: unable to index file Crashlytics.framework/Headers Commented May 22, 2016 at 14:41

2 Answers 2

1

If you want to come back to the previous recent version of your file/dir, executing:

git reset HEAD qooxdoo

should work.

Sign up to request clarification or add additional context in comments.

Comments

0

The git rm -rf qooxdoo command should have been done in its own commit, followed by the submodule addition. That will tell git (when merging from master into branch) about the intentions. Currently, the same commit being merged is just replacing the files/contents - so git gets confused. Any chance you can replay the master commit?

1 Comment

Sorry, that repo is long gone, so I cannot test it. However you answer seems logical, so it's your ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.