【问题标题】:git add files within folders with @ sign - fatal: Not a git repositorygit在带有@符号的文件夹中添加文件-致命:不是git存储库
【发布时间】:2013-02-27 11:13:22
【问题描述】:

我想添加名称中带有 @ 符号的文件夹。由于程序限制,我无法重命名它们,但我也不能将它们添加到我的 github 存储库中。

文件夹名称是:

zoteroOpenOfficeIntegration@zotero.org
zoteroWinWordIntegration@zotero.org

git错误信息是:

G:\PortableApps\PortableApps\GitPortable\Data\home\github\PortableApps>git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#       Zotero Standalone/
nothing added to commit but untracked files present (use "git add" to track)

G:\PortableApps\PortableApps\GitPortable\Data\home\github\PortableApps>git add "
Zotero Standalone"
fatal: Not a git repository: Zotero Standalone/ZoteroStandalonePortable/App/Zote
ro Standalone/extensions/zoteroWinWordIntegration@zotero.org/../../.git/modules/
modules/zotero-word-for-windows-integration

有没有办法将带有@符号的文件夹中的文件添加到git仓库?

【问题讨论】:

  • 确切的命令是什么?我可以添加位于包含“@”的目录中的文件(您不会在 git 中添加文件夹,仅添加文件)
  • 你好,查尔斯。我在初始帖子中添加了完整的 git 程序。
  • 你正在添加一个目录包含它自己一个git存储库,这是不对的。你想做什么?
  • 现在很清楚了。我试图添加的扩展文件夹确实包含一个 .git 文件。我把它们放在我的 .gitignore 中,现在我可以成功推送文件夹了。因此,它与@ 符号没有任何关系。很高兴知道这一点。

标签: git github


【解决方案1】:

您看到的错误与文件夹中的@ 字符无关,而是与您尝试将存储库添加到另一个存储库这一事实有关。相反,您应该将其添加为子模块。

【讨论】:

    猜你喜欢
    • 2013-08-27
    • 1970-01-01
    • 1970-01-01
    • 2011-06-05
    • 2012-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多