git 在带有 @ 符号的文件夹中添加文件 - fatal : Not a git repository

标签 git github

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

文件夹名称是:

<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="7903160d1c0b1636091c17361f1f101a1c30170d1c1e0b180d1016173903160d1c0b1657160b1e" rel="noreferrer noopener nofollow">[email protected]</a>
<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90eaffe4f5e2ffc7f9fec7ffe2f4d9fee4f5f7e2f1e4f9fffed0eaffe4f5e2ffbeffe2f7" rel="noreferrer noopener nofollow">[email protected]</a>

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/<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="0d776279687f625a64635a627f69446379686a7f6c796462634d776279687f6223627f6a" rel="noreferrer noopener nofollow">[email protected]</a>/../../.git/modules/
modules/zotero-word-for-windows-integration

是否有任何解决方案可以将带有 @ 符号的文件夹中的文件添加到 git 存储库?

最佳答案

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

关于git 在带有 @ 符号的文件夹中添加文件 - fatal : Not a git repository,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15110649/

相关文章:

linux - 自定义 git diff 输出格式( block 头中我的文件的自己的函数名称)

windows - Git: 无法推送 {n/a (unpacker error)}

git递归添加所有.tex文件

git - 在 git 上可以安全忽略哪些报告服务文件类型?

git - 如何在 GitHub 上的子目录中创建 README 文件

github - 无法在 sourcetree 和 github 之间获取 SSH key

windows - 在 Jenkins 用户下的 Windows Git 中指定 SSH 凭据/ key

git - 如何在 Gerrit 中创建一个新的补丁集?

Github Desktop - 分支不删除

android - 如何下载适用于 Nexus 9 的安卓 Lollipop 源代码?