Re: How to commit removed file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]