(beginner) git rm

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Date: Wednesday, January 28, 2009 - 6:11 am

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.

--
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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
(beginner) git rm, Zabre, (Wed Jan 28, 6:11 am)
Re: (beginner) git rm, Peter Krefting, (Wed Jan 28, 6:36 am)
Re: (beginner) git rm, Zabre, (Wed Jan 28, 7:05 am)
Re: (beginner) git rm, Tomas Carnecky, (Wed Jan 28, 7:37 am)
Re: (beginner) git rm, Zabre, (Wed Jan 28, 8:00 am)
Re: (beginner) git rm, Tomas Carnecky, (Wed Jan 28, 8:19 am)
Re: (beginner) git rm, Zabre, (Wed Jan 28, 2:23 pm)
Re: (beginner) git rm, Björn, (Wed Jan 28, 4:17 pm)
Re: (beginner) git rm, Zabre, (Wed Jan 28, 4:42 pm)
Re: (beginner) git rm, Junio C Hamano, (Wed Jan 28, 5:29 pm)
Re: (beginner) git rm, Björn, (Wed Jan 28, 6:13 pm)
Re: (beginner) git rm, Junio C Hamano, (Wed Jan 28, 6:33 pm)
Re: (beginner) git rm, Zabre, (Wed Jan 28, 5:05 pm)
Re: (beginner) git rm, Theodore Tso, (Wed Jan 28, 9:03 am)
Re: (beginner) git rm, Zabre, (Wed Jan 28, 2:25 pm)