I also read a lot on this and don't grasp it. I can delete and Keep local, in Windows Explorer or in Tortoisegit. Elsewhere here, it was recommended to push and then pull to/from remote to make the delete stick.

I don't want the delete in remote/origin (yet), I want it only in my local repository.

How to do that? After my next commit to the local repository (although the files are marked red in commit Dialog and are checked), the Windows overlay in Explorer does Show them as part of the repo again.

There should be a way to get them out of the next commit, but Keep them in the old commits, but I don't see what to do.

Looking at the command line descriptions, it seems I would Need to stage by rm and then in commit add some extra Options. Doesn't Tortoise do this?

thanks for any help,

Klaus

有帮助吗?

解决方案

this seems to be a bug in 64 bit TortoiseGit, see https://tortoisegit.org/issue/1675 where is is described for deleting Folders Keep local.

The original idea of how it should work seems to be what I wrote in my comment: the file is kept localy in the Directory as untracked, but should be removed from the local index. The bug seems to be fixed (see This issue was closed by revision 3a6e98b0c2e0 in the abovementioned link). Haven't tried yet.

If I don't come back here, upgrading has solved the Problem. Maybe this helps others having a similiar Problem.

thanks for all answers.

Klaus

其他提示

I don't want the delete in remote/origin (yet), I want it only in my local repository.

That is what a "Delete (keep local)" does: it is a git rm --cached: your file is removed from the index, but not from the working directory.
You next commit will record that deletion, but the file will stii be there on your disk.

That won't affect the remote 'origin', not until you push that commit.

You can also, once the delete is done, add that file to your .gitignore in order to not add it again.

Above answer is correct. But in windows you can delete open files.

So if your git workspace root is C:/something/git/project and and you issue a command as un tracked and git rm --cached project/foo/bar.

If bar is open anywhere (Explorer, eclipse or anywhere else) file will remain as un tracked

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top