Skip to main content
 首页 » 编程设计

android-studio之如何在 android studio 上使用 bitbucket 源代码控制

2026年04月06日38cloudgamer

我知道以前有人问过这种问题。 但是我查看了所有旧答案,但没有任何效果。

我尝试使用 bitbucket 的“插件”——但它不起作用。 我尝试将 android studio 代码存储库定义为 GIT,并将 bitbucket 定义为我在某些手册中找到的存储库 - 但仍然根本不起作用。

有什么办法吗?

顺便说一句:我有现有的代码,我想从 android studio 中检查它。

请帮忙。

请您参考如下方法:

事实上你不需要任何插件。首先,只需在您的项目中启用版本控制:

然后在下拉菜单中选择Git:

现在在您的 Android Studio 中打开命令行并使用以下命令:

git config --global user.name "YOUR NAME" 
git config --global user.email "MAIL@gmail.com" 
 
git init 
git remote add origin https://UserName@bitbucket.org/UserName/Test.git 
git add --all 
git commit -m "initial commit" 
git push -u origin master 

下次,您不需要任何命令。您可以在 Android studio 中使用菜单按钮完成您的工作。

P.S:如果是gitlab | github 你只需要将远程 url 更改为以下内容:

git remote add origin https://gitlab.com/UserName/Test.git