【问题标题】:Git Issue: Can't removed "untracked" sibling directories from git statusGit 问题:无法从 git status 中删除“未跟踪”的同级目录
【发布时间】:2021-04-08 00:07:29
【问题描述】:

我已经在一个新的 repo 中启动了一个新项目,另外两个项目和 repos 在同一个本地目录中。 Git 状态不断向我显示这些其他目录(即 ../OtherProject)作为未跟踪的项目。我似乎无法在 gitignore 或使用 git clean 中删除它们。这很烦人,因为我不想看到它们并阻止其他一些命令成功运行。

【问题讨论】:

  • two other projects and repos in the same local directory 是什么意思?你能提供更多细节吗?
  • 我在同一个父目录中还有另外两个 git repo 目录。这有意义吗?

标签: git github git-untracked


【解决方案1】:

我自己解决了这个问题:看起来因为我在父目录中初始化了 git,所以跟踪和未跟踪的文件都是基于它的,当我认为我正在从本地 repo 的 git 实例运行 git 命令时命令实际上基于 .git 文件所在的父目录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-01-05
    • 2011-06-04
    • 1970-01-01
    • 2015-08-01
    • 1970-01-01
    • 2016-03-22
    • 2014-08-09
    • 2019-05-13
    相关资源
    最近更新 更多