【问题标题】:Git status shows me all parents directoryGit状态向我显示所有父母目录
【发布时间】:2013-09-23 23:46:13
【问题描述】:

我在一个想要推送到 Github 的目录中。 git status 告诉我:

 On branch master
#
# Initial commit
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)

#   ../directory1/
#   ../directory2/
#   ../directory3/
#   ../directory4/
nothing added to commit but untracked files present (use "git add" to track)

这些目录是我正在工作的目录的后退一步。 它没有向我显示真实目录项目中的更改。 有什么想法吗?

【问题讨论】:

  • 似乎在带有directory{1..4} 的分支中有一个.git 文件夹,而不是实际项目所在的位置。那正确吗?那么你可能在错误的文件夹中运行了git init

标签: git shell github terminal


【解决方案1】:

存储库的根目录比您期望的位置高一级。您可能在错误的目录中对其进行了初始化。导航到要在其中初始化它的目录,然后重新初始化。通过删除 ../.git 来擦除无意的存储库

【讨论】:

    猜你喜欢
    • 2022-11-04
    • 2020-05-17
    • 2011-09-23
    • 1970-01-01
    • 2011-12-19
    • 2013-12-07
    • 1970-01-01
    • 2014-07-03
    • 1970-01-01
    相关资源
    最近更新 更多