【发布时间】:2023-03-17 18:50:02
【问题描述】:
我在暂存区的某个地方有一个奇怪的文件,我不想提交。但是我很难删除它...
$ git st
On branch 112929_shedd
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: RDI.Core/Business/Utilities/IntranetMaintData.cs
new file: "h origin \357\200\27295320_fix_text"
modified: privatedn/Employees/SkillsMatrix/Certifications.aspx
modified: privatedn/Employees/SkillsMatrix/Education.aspx
modified: privatedn/Employees/SkillsMatrix/Organizations.aspx
modified: privatedn/Employees/SkillsMatrix/ProjectHistory.aspx
modified: privatedn/Employees/SkillsMatrix/Publications.aspx
modified: privatedn/Employees/SkillsMatrix/References.aspx
modified: privatedn/Employees/SkillsMatrix/SkillsGroupDetails.aspx
modified: privatedn/Employees/SkillsMatrix/SkillsMatrixMaster.master
modified: privatedn/Employees/SkillsMatrix/TextFilter.aspx
modified: privatedn/MenuGroupDetails.aspx.cs
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: privatedn/RDI.Intranet.csproj
$ git rm --cached "h origin \357\200\27295320_fix_text"
fatal: pathspec 'h origin \357\200\27295320_fix_text' did not match any files
我想删除“h origin \357\200\27295320_fix_text”
【问题讨论】:
-
也试过 git reset HEAD "h origin \357\200\27295320_fix_text"
-
请添加
ls的输出。该文件应该在那里,因为它没有在“未暂存”部分中列出。
标签: git