git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: merging confusion and question

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 8, 2012, 01:43 UTC
Message-ID
<7v393yupjp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<5021B20D.2030702@palm.com>
Rich Pixley <rich.pixley@palm.com> writes:
Show 26 quoted lines
> I'm confused.
>
> What is the intended work flow here?  Ie, aside from trashing my
> repository and starting over, what does one do to recover?
>
> rich@cobra> git clone /home/rich/repos/webos webos
> Cloning into 'webos'...
> done.
> rich@cobra> cd webos
> rich@cobra> git remote add central git@github.com:openwebos/webos.git
> rich@cobra> git co master
> Already on 'master'
> rich@cobra> git pull central master
> X11 forwarding request failed on channel 0
> remote: Counting objects: 22, done.
> remote: Compressing objects: 100% (19/19), done.
> remote: Total 21 (delta 12), reused 11 (delta 2)
> Unpacking objects: 100% (21/21), done.
> From github.com:openwebos/webos
>  * branch            master     -> FETCH_HEAD
> warning: Failed to merge submodule meta-webos (not checked out)
> Auto-merging meta-webos
> CONFLICT (submodule): Merge conflict in meta-webos
> Auto-merging README.md
> Automatic merge failed; fix conflicts and then commit the result.
> rich@cobra> git commit -a

Why isn't there any "fix conflicts and then" step between this line and the friendly insn message on the previous line?

Show 16 quoted lines
> error: unable to index file meta-webos
> fatal: updating files failed
> rich@cobra> git add meta-webos
> error: unable to index file meta-webos
> fatal: updating files failed
> rich@cobra> git rm meta-webos
> meta-webos: needs merge
> rm 'meta-webos'
> fatal: git rm: 'meta-webos': Is a directory
> rich@cobra> git merge meta-webos
> error: 'merge' is not possible because you have unmerged files.
> hint: Fix them up in the work tree,
> hint: and then use 'git add/rm <file>' as
> hint: appropriate to mark resolution and make a commit,
> hint: or use 'git commit -a'.
> fatal: Exiting because of an unresolved conflict.

If you are not interested in mucking with meta-webos with this merge, you would resolve meta-webos by taking either your (i.e. the one that came from /home/rich/repos/webos) version or their (i.e. the one that came from openwebos/webos.git) version. Go back to the state before "git pull central master" with "reset --hard", init and update webos submodule, try the "pull" again and then "git add webos" to resolve to your version, perhaps?

Previous: Rich PixleyNext: Rich Pixley
Message 2 of 5 in “merging confusion and question”
  1. Rich PixleyAug 8, 2012
  2. Junio C HamanoAug 8, 2012
  3. Rich PixleyAug 8, 2012
  4. Phil HordAug 10, 2012
  5. Junio C HamanoAug 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.