From: Peter Krefting <peter@softwolves.pp.se>
To: Zabre <427@free.fr>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: (beginner) git rm
Date: Wed, 28 Jan 2009 11:36:40 +0100 (CET) [thread overview]
Message-ID: <Pine.LNX.4.64.0901281133380.645@ds9.cixit.se> (raw)
In-Reply-To: <1233137498146-2231416.post@n2.nabble.com>
Zabre:
> I delete one file in the new branch
> $ git rm d.txt
> $ ls
> a.txt b.txt c.txt
Here you have not yet committed the change, so the change is only in
the staging area. You need to
git commit
to create a commit on your branch.
> Then I go back to the master branch and list the files there
> $ git checkout master
Since you have not yet made any commits to your branch, master and new
both point to the same commit, meaning that this is does nothing but
changes which branch you are committing to.
> $ls
> a.txt b.txt c.txt
You are in the same place as you were a moment ago, but you have told
Git that you want to commit the removal to master instead of new.
--
\\// Peter - http://www.softwolves.pp.se/
next prev parent reply other threads:[~2009-01-28 10:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 10:11 (beginner) git rm Zabre
2009-01-28 10:36 ` Peter Krefting [this message]
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
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=Pine.LNX.4.64.0901281133380.645@ds9.cixit.se \
--to=peter@softwolves.pp.se \
--cc=427@free.fr \
--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).