首页 > 解决方案 > 从 git 中删除未跟踪的文件

问题描述

我不太确定我是如何进入这种状态的,但由于某种原因,git 将我的 c:\Users 目录下的所有内容检测为未跟踪文件,因此当我执行 git status 时,我得到以下信息:

>git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ../../../3D Objects/
    ../../../AppData/
    ../../../Contacts/
    ../../../Desktop/
    ../../../Documents/
    ../../../Downloads/
    ../../../Favorites/
    ../../../Google Drive/
    ../../../Links/
    ../../../Music/
    ..... and many more

显然我不希望这些被跟踪或提交。如何在不从我的文件系统中删除任何文件的情况下从git 中删除这些文件

标签: git

解决方案


推荐阅读