git - git 没有找到包含裸存储库的重新安装的 USB 驱动器
问题描述
我在 USB 驱动器上启动了一个裸存储库,因此我可以对多台机器进行良好的版本控制。
在机器(mac)上克隆 USB 存储库后,我移除了 USB 并继续处理克隆的本地副本。然后我将 USB 重新安装到机器上并尝试将我的工作推送到 USB 上。但是,当我尝试推送时出现此错误
git push usb master
fatal: 'usb' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我认为这意味着 git 没有找到任何远程存储库。当我尝试时,git remote
没有出现远程存储库。我还确保我在同一个端口上重新安装了 USB,但问题仍然存在。我需要以某种方式重新建立连接吗?
解决方案
添加 USB repo 遥控器,然后您可以推送到它:
git remote add myUSB /path/to/usb/repo
# then you could do
git fetch myUSB
git push myUSB some-branch
推荐阅读
- java - 使用antlr4将java翻译成c#
- windows - 启动子进程的问题应该使用与其父进程不同的python环境
- android-studio - 无法在 ubuntu 20.04 上打开没有 root 的 android studio
- typescript - 从流中添加人脸时出现 Azure 人脸检测 API 错误
- c - C:指向 char[] 类型的结构成员的 void 指针
- r - ggeffects::ggpredict 是否有一个完整的参数
- opentbs - 如何使用 opneTBS 输出逗号分隔的值字符串
- json - 如何在 Apache Nifi 中使用 Jolt 转换处理 XML 数据
- python - 第一次尝试创建python库。被 modulenotfounderror 困扰
- postgresql - 基于 Heroku Postgres 的 api 设置错误 503