2

我有一个文件已从其文件夹中移出,git 将此文件视为已删除,因此您运行:

git add -u

这会将已删除的文件添加到您的“要提交的更改”中,我尝试使用:

git rm 
git clean -f and -n

有没有人遇到过类似的问题?这里是什么git status状态:

git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
  deleted: path/file.txt

我正在使用 git bash 运行 Windows 8。

4

2 回答 2

1

要提交更改,请执行git commit.

于 2013-07-09T13:46:20.390 回答
0

我相信您正试图从整个 git 历史记录中删除一个文件。

为此,遵循下一页上的答案将有所帮助:

从 Git 历史记录中删除敏感文件及其提交

于 2013-07-09T17:20:42.237 回答