本文介绍了使用 Bitbucket 团队 repo 配置 Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将 Android Studio 配置为与我的团队在 Bitbucket 上的存储库一起使用.我首先想做的是将我的本地项目推送到我团队的存储库中.
I am trying to configure Android Studio to work with my team repo on Bitbucket. What I would like to do in the first place is to push my local project onto my team's repo.
我已经安装了 Bitbucket 插件,但真的不知道从哪里开始.当我尝试提交更改时,我得到的只是未检测到更改".
I have already installed the Bitbucket plugin but don't really know where to go from here. When I try to commit the changes, all I get is "No changes detected".
推荐答案
不使用任何插件
- 首先从android studio的VCS菜单中选择Enable Version Control Integration,它会要求你选择版本控制工具,从下拉.
- 在项目的 BitBucket 帐户中创建新存储库,选择 git 作为存储库类型.
- 现在从android studio底部的终端窗口,输入:
git add -A
这会将文件添加到 git 以进行提交. - 在终端中使用消息类型
git commit -m "First Commit"
提交.这里,First Commit 只是我用来演示的一条消息. - 在 Bitbucket 新创建的存储库中,从下方选择我有一个现有项目.它会给你两个命令行命令.连续使用它们.这些会将本地存储库添加到 bitbucket.第一个:
git remote add origin https://example@bitbucket.org/example/test.git
第二个:git push -u origin master
- 再次添加
git add -A
- 然后提交
git commit -m "Second Commit"
最后一次推送
git push origin master
- First from VCS menu of android studio select Enable Version Control Integration, it will ask you for selecting versioning tool, select git from the drop down.
- Create new repository in the BitBucket account for the project, selecting git as the repository type.
- Now from the terminal window at the bottom of android studio, type:
git add -A
This will add the files to git for committing. - To commit with a message type
git commit -m "First Commit"
in the terminal. Here, First Commit is just a message i used for demonstration. - From Bitbucket, in the newly created repo, select I have an Existing Project from below. It will give you two command line commands. Use Them consecutively. These will add the local repo to the bitbucket. First one:
git remote add origin https://example@bitbucket.org/example/test.git
Second one:git push -u origin master
- Add again
git add -A
- Then Commit
git commit -m "Second Commit"
Push for the last time
git push origin master
你可以通过编写git status
在分支主您的分支是最新的 'origin/master'.没什么可提交的,工作树很干净
2.3.3
&git 版本 2.13.0.windows.1
2.3.3
& git version 2.13.0.windows.1
这篇关于使用 Bitbucket 团队 repo 配置 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!