我在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