我在 git repo 中有以下状态:
git status
On branch whatever
Your branch is ahead of 'origin/whatever' by 1 commit.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
docs/file1.docx
nothing added to commit but untracked files present (use "git add" to track)
所以我会做一个:
git clean -fdx
之后 agit status
将显示以下内容:
On branch whatever
Your branch is ahead of 'origin/whatever' by 1 commit.
(use "git push" to publish your local commits)
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
deleted: docs/file1.docx
no changes added to commit (use "git add" and/or "git commit -a")
如果我删除未跟踪的文件,它们怎么会被标记为已删除?