git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org, "Michael S. Tsirkin" <mst@mellanox.co.il>
Subject: Re: How to commit removed file?
Date: Tue, 02 Jan 2007 13:40:41 -0800	[thread overview]
Message-ID: <7vfyatt8di.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0701022211100.22628@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Tue, 2 Jan 2007 22:12:33 +0100 (CET)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Tue, 2 Jan 2007, Michael S. Tsirkin wrote:
>
>> > I'd like to remove a file and commit the removal while
>> > leaving out other changes in repository/index.
>> > 
>> > $git rm kernel_patches/fixes/ib_verbs_warning_fix.patch
>> > rm 'kernel_patches/fixes/ib_verbs_warning_fix.patch'
>> > 
>> > $ git commit kernel_patches/fixes/ib_verbs_warning_fix.patch
>> > error: pathspec 'kernel_patches/fixes/ib_verbs_warning_fix.patch' did not match
>> > any file(s) known to git.
>> > Did you forget to 'git add'?
>> > 
>> > A similiar thing works with "git add".
>> 
>> Any ideas? Can this be done with git?
>
> Did you actually try the "--" thing I suggested in 
> http://article.gmane.org/gmane.comp.version-control.git/35699/?
>
> Besides, I just tested with current "next": 
>
> $ git commit kernel_patches/fixes/ib_verbs_warning_fix.patch
> Created commit 89a5bb5ac16fb8be9b6e061284e191cafb3e4da2
>  1 files changed, 0 insertions(+), 22 deletions(-)
>  delete mode 100644 a234

The difference is Michael did "git rm" to explicitly tell git to
forget about that path, while you used the vanilla "/bin/rm".

Personally I never saw the point of having "git rm".  Maybe we
should remove it to prevent this confusion from happening.

  reply	other threads:[~2007-01-02 21:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-31 10:24 How to commit removed file? Michael S. Tsirkin
2006-12-31 15:06 ` Johannes Schindelin
2007-01-02 20:10 ` Michael S. Tsirkin
2007-01-02 21:12   ` Johannes Schindelin
2007-01-02 21:40     ` Junio C Hamano [this message]
2007-01-02 22:13       ` Jakub Narebski
2007-01-02 22:20       ` Johannes Schindelin
2007-01-03  0:55       ` Carl Worth
2007-01-06  1:57         ` Junio C Hamano
2007-01-12  1:40           ` Carl Worth
2007-01-12 10:42             ` Jakub Narebski
2007-01-03  6:06       ` Michael S. Tsirkin
2007-01-03  6:51         ` Junio C Hamano
2007-01-03  7:14           ` Junio C Hamano
2007-01-04 17:41             ` Michael S. Tsirkin
2007-01-02 21:49     ` Juergen Ruehle

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=7vfyatt8di.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=mst@mellanox.co.il \
    /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).