git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (beginner) git rm
@ 2009-01-28 10:11 Zabre
  2009-01-28 10:36 ` Peter Krefting
  0 siblings, 1 reply; 16+ messages in thread
From: Zabre @ 2009-01-28 10:11 UTC (permalink / raw)
  To: git


Hi,

I am learning git and there is something I don't get : why a file deleted in
a branch gets also deleted in my master?
(For the moment I'm only working locally, no remote repository)

I have a master branch containing 4 text files called a.txt , b.txt , c.txt
, d.txt . (in HEAD)

I create a new branch from there (masters HEAD) and go to this new branch.
$ git branch new
$ git checkout new

I delete one file in the new branch
$ git rm d.txt
$ ls
a.txt b.txt c.txt

Then I go back to the master branch and list the files there
$ git checkout master
$ls
a.txt b.txt c.txt

I have not modified the master branch, why is d.txt deleted there also?

There must be something I did not understand in git behaviour (something to
do with the index?)
Thank you for your help.
-- 
View this message in context: http://n2.nabble.com/%28beginner%29-git-rm-tp2231416p2231416.html
Sent from the git mailing list archive at Nabble.com.

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

end of thread, other threads:[~2009-01-29  2:37 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-28 10:11 (beginner) git rm Zabre
2009-01-28 10:36 ` Peter Krefting
2009-01-28 11:05   ` Zabre
2009-01-28 11:37     ` Tomas Carnecky
2009-01-28 12:00       ` Zabre
2009-01-28 12:19         ` Tomas Carnecky
2009-01-28 13:03           ` Theodore Tso
2009-01-28 18:25             ` Zabre
2009-01-28 18:23           ` Zabre
2009-01-28 20:17             ` Björn Steinbrink
2009-01-28 20:42               ` Zabre
2009-01-28 21:05                 ` Zabre
2009-01-28 21:29                 ` Junio C Hamano
2009-01-28 22:13                   ` Björn Steinbrink
2009-01-28 22:33                     ` Junio C Hamano
     [not found]                       ` <6bef44ba0901281711m2d05e70fj4dd3ae03d7fe1052@mail.gmail.com>
2009-01-29  2:34                         ` Björn Steinbrink

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