git - 从 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 中删除这些文件
解决方案
推荐阅读
- javascript - 在不同函数中更新特定变量时如何使用回调
- android - 如何选择旋转视频并全屏显示?
- spring-boot - H2数据库定期损坏
- python - 如何使用 InstaPy 点赞用户的所有帖子?
- xslt - 使用 XSLT 取消引用实体
- java - 如何将模型旋转到 scenform 中的另一个模型?
- terraform - Terraform 和 AWS ECS:类似于 Kubernetes 或 Docker swarm 的配置/秘密
- excel - Excel VLOOKUP 在允许近似匹配时返回#N/A,但在要求完全匹配时返回值?
- python - 使用 Python / Pandas 在 JSON 数据中创建新的键值?
- mysql - 如何分析时间序列数据并删除“重复”记录