* Trouble merging to master when topic branch has a dir added
@ 2008-05-03 13:51 Frodo Baggins
2008-05-05 14:27 ` Jeremy Ramer
0 siblings, 1 reply; 2+ messages in thread
From: Frodo Baggins @ 2008-05-03 13:51 UTC (permalink / raw)
To: git
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Trouble merging to master when topic branch has a dir added
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
0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Ramer @ 2008-05-05 14:27 UTC (permalink / raw)
To: Frodo Baggins; +Cc: git
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-05 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).