更改本地项目上的 bitbucket 存储库名称

Inf*_*eus 4 git android bitbucket android-studio

我使用带有 bitbucket 的 Android Studio。我更改了存储库的名称,现在当我尝试推送时,收到消息Fatal error, repository not found。如何更新我的 Android Studio 项目上的新存储库名称以正确推送?提前致谢。

xia*_*orm 6

请参阅我的示例:转到终端,

cd projectFolder
git remote -v (it will show previous git url)
git remote set-url origin https://username@bitbucket.org/username/newName.git
git remote -v (double check, it will show new git url)
git push (do whatever you want.)
Run Code Online (Sandbox Code Playgroud)

看我的例子: 在此处输入图片说明


Inf*_*eus 2

我简单地更改了存储库名称,访问项目的 .git 文件夹内的配置文件。这解决了问题。