我删除了旧的Github存储库(名称:RealmDemo),并使用新名称daftar-negatif-investasi创建了新的仓库。我在Windows 10上,并且已删除旧的远程存储库,并使用以下命令(使用Git Bash)添加了新的远程存储库:
git remote rm origin
git remote add https://github.com/masumo/daftar-negatif-investasi.git
但是,Android Studio总是给我以下错误消息:
失败并发生错误:致命:存储库“ https://github.com/masumo/RealmDemo.git/ ”未找到
当我尝试推送到我的Github存储库时。
我相信远程存储库已经更改,因为运行git remote -v
命令会给我以下结果:
origin https://github.com/masumo/daftar-negatif-investasi.git (fetch)
origin https://github.com/masumo/daftar-negatif-investasi.git (push)
似乎Android Studio仍然引用旧的存储库。这个问题有什么解决办法吗?
这是我无法识别工作目录的原因。在将项目重构为新名称后,Git Bash应用程序会以某种方式将默认工作目录移动到上一级。我没有注意到这一点,所有这些命令都是在新项目目录的上层执行的。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句