[英]How can I remove ~$ files using git bash (on windows)
I don't see the file in explored, even with the "show hidden objects" setting.即使使用“显示隐藏对象”设置,我也看不到探索中的文件。 On the other hand git shows it as untracked files and I found no way to remove it.
另一方面,git 将其显示为未跟踪的文件,我发现无法将其删除。
Any ideas?有任何想法吗?
git status
On branch devSQC
Your branch is up to date with 'origin/devSQC'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
pathto/~$crazy file.xlsx
nothing added to commit but untracked files present (use "git add" to track)
ls pathto/
'~$crazy file.xlsx'
git rm -f 'pathto/~$crazy file.xlsx'
fatal: pathspec 'pathto/~$crazy file.xlsx' did not match any files
I know those are windows files for recovery, but windows does not allow to do anything either and I hope git bash is better ;-) See eg here but I hope, I don't need to install additional tools...我知道那些是用于恢复的 Windows 文件,但 Windows 也不允许做任何事情,我希望 git bash 更好;-) 参见这里的例子,但我希望,我不需要安装额外的工具......
I just realized, it is simple to remove those files within bash (of course, it has nothing to do with git...)我刚刚意识到,在 bash 中删除这些文件很简单(当然,它与 git 无关......)
cd path2/
rm -f '~$FHS_Noten STAT_FS2019_TZ17_Noten_Vorlage.xlsx'
git-rm
does not work because it git-rm
不起作用,因为它
Remove files from the working tree and from the index
从工作树和索引中删除文件
so it is not a function to delete files.所以它不是删除文件的功能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.