gpt4 book ai didi

android-studio - 更改存储库后,在 Android Studio 2.1.2 上未找到 GIthub 存储库错误

转载 作者:行者123 更新时间:2023-12-03 17:44:45 29 4
gpt4 key购买 nike

我删除了旧的 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 总是给我这个错误信息:

Failed with error: fatal: repository 'https://github.com/masumo/RealmDemo.git/' not found

当我尝试推送到我的 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/config 文件并删除行:

[remote "origin"]
url = https://github.com/githubaccountname/MyProject.git
fetch = +refs/heads/*:refs/remotes/origin/*

关于android-studio - 更改存储库后,在 Android Studio 2.1.2 上未找到 GIthub 存储库错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38112917/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com