git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question about a merge result
@ 2009-04-30 12:21 Francis Moreau
  2009-04-30 12:34 ` Michael Gaber
  0 siblings, 1 reply; 7+ messages in thread
From: Francis Moreau @ 2009-04-30 12:21 UTC (permalink / raw)
  To: git

Hello,

I'm a little bit confused about a merge I have done and the result
suprised me. Thinking about it I'm still not convinced what should be
the result.

Here's the use case:

$ mkdir test-git && cd test-git
$ date > A
$ date > B
$ git init
$ git add .
$ git commit -m "Init"

So far I just created a repo with 2 files A and B

$ git branch b1
$ git rm B
$ git commit -m "remove B"

Now I created a branch 'b1' and remove B file in master branch

$ git checkout b1
$ git rm B
$ git commit -m "remove B"
$ git revert HEAD

Now on 'b1' I did the same as master but I thought that removing B was
a bad idea so I revert the previous commit

$ git checkout master
$ git pull . b1
$ ls B
ls: cannot access B: No such file or directory

So merging 'b1' into master removed the B file even if in branch 'b1'
I restored it.

Could anybody explain me why this is the correct behaviour and why not
file 'B' is not restored as it was done in branch 'b1' ?

thanks
-- 
Francis

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-05-01 16:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-30 12:21 question about a merge result Francis Moreau
2009-04-30 12:34 ` Michael Gaber
2009-04-30 14:26   ` Jeff King
2009-04-30 15:05     ` Francis Moreau
2009-04-30 15:39       ` Björn Steinbrink
2009-04-30 15:42       ` Jeff King
2009-05-01 16:27       ` Daniel Barkalow

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).