git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jeremy Ramer" <jdramer@gmail.com>
To: "Frodo Baggins" <frodo.drogo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Trouble merging to master when topic branch has a dir added
Date: Mon, 5 May 2008 08:27:14 -0600	[thread overview]
Message-ID: <b9fd99020805050727o54cb9af2o3b43257fb32aac60@mail.gmail.com> (raw)
In-Reply-To: <1cdff3fa0805030651j5d1936bdh4f7999163b7444ba@mail.gmail.com>

It looks like there is some uncommitted changes in the file
logger-src/logger.cpp.  You cannot switch to the master branch because
it has no knowledge of that file so any uncommitted changes will be
lost.  If the changes are important you should commit them first (to a
side branch if you don't want them to be part of the merge) or if
useless you can remove them with
git checkout HEAD logger-src/logger.cpp

On Sat, May 3, 2008 at 7:51 AM, Frodo Baggins <frodo.drogo@gmail.com> wrote:
> Hi,
>  This is a newbie question.
>
>  I created a topic branch and made a few commits which added a few
>  directories. I'd like to merge these changes back to master.
>  I get the following error messages.
>
>  frodo@laptop-zion:~/src/c/logger$ ls
>  logger-inc  logger-src  Makefile  test-driver
>  frodo@laptop-zion:~/src/c/logger$ git branch
>   debug-printf-help
>   debug-static
>   master
>  * split-into-dirs
>  frodo@laptop-zion:~/src/c/logger$ git checkout master
>  fatal: Entry 'logger-src/logger.cpp' would be overwritten by merge.
>  Cannot merge.
>
>  I think the above error is due to the fact that the branch master did
>  not have these directories.
>
>  frodo@laptop-zion:~/src/c/logger$ git-ls-tree master
>  100644 blob 82ccb7971fc36db2bc54bb5a590f97cd37c998fb    .gitignore
>  100644 blob 9971a5a432d575cc682145454e5260f83e1b9fb3    Makefile
>  100644 blob b8f6c213ebb831ed8704b7f0e0e665212b808649    client.cpp
>  100644 blob d01aaec4138862ccae4be9de2c672ddaeccfa21d    logger.cpp
>  100644 blob 37c15a22b325934ea685a76cfd528c2bf6464f2b    logger.h
>  frodo@laptop-zion:~/src/c/logger$ git-ls-tree split-into-dirs
>  100644 blob 82ccb7971fc36db2bc54bb5a590f97cd37c998fb    .gitignore
>  100644 blob 7c497aff60175ce212415c1737e224f517f785e9    Makefile
>  040000 tree 4f181412688afaa30929b752cc1fb3f2cda3cba9    logger-inc
>        <=== new dir
>  040000 tree 4fb363dac2a00d93d1a958f74021fcd0e3bc861e    logger-src
>       <===
>  040000 tree bb2b91b6ec1d11d23ab8e7a3c8935504079f6bf3    test-driver         <===
>
>
>  Could someone help me out with this?
>  frodo@laptop-zion:~/src/c/logger$ git --version
>  git version 1.5.2.5
>
>  Regards,
>  Frodo B
>  --
>  Never laugh at live dragons.
>                               -- Bilbo Baggins
>  --
>  To unsubscribe from this list: send the line "unsubscribe git" in
>  the body of a message to majordomo@vger.kernel.org
>  More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

      reply	other threads:[~2008-05-05 14:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-03 13:51 Trouble merging to master when topic branch has a dir added Frodo Baggins
2008-05-05 14:27 ` Jeremy Ramer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9fd99020805050727o54cb9af2o3b43257fb32aac60@mail.gmail.com \
    --to=jdramer@gmail.com \
    --cc=frodo.drogo@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).