From: Jakub Narebski <jnareb@gmail•com>
To: git@vger•kernel.org
Subject: Re: How to commit removed file?
Date: Tue, 02 Jan 2007 23:13:45 +0100 [thread overview]
Message-ID: <enel8u$n8g$2@sea.gmane.org> (raw)
In-Reply-To: 7vfyatt8di.fsf@assigned-by-dhcp.cox.net
Junio C Hamano wrote:
> 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.
Does this happen with new git-rm, which removes file also from
working directory?
BTW. you probably can do this with git-update-index...
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
next prev parent reply other threads:[~2007-01-02 22:11 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
2007-01-02 22:13 ` Jakub Narebski [this message]
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='enel8u$n8g$2@sea.gmane.org' \
--to=jnareb@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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