我想添加名称中带有 @ 符号的文件夹。由于程序限制,我无法重命名它们,但也无法将它们添加到我的 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/