使用Bitbucket团队存储库配置Android Studio [英] Configure Android Studio with Bitbucket team repo

查看:136
本文介绍了使用Bitbucket团队存储库配置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".

推荐答案

不使用任何插件

  1. 首先从android studio的 VCS 菜单中选择启用版本控制集成,它将要求您选择版本控制工具,然后从下拉.
  2. 在项目的BitBucket帐户中
  3. 为项目创建新存储库,选择 git 作为存储库类型.
  4. 现在从android studio底部的终端窗口中,键入:git add -A 这会将文件添加到git中进行提交.
  5. 要在消息中键入git commit -m "First Commit"来提交消息.在这里,第一次提交"只是我用于演示的一条消息.
  6. 从Bitbucket的新创建的存储库中,从下面选择我有一个现有项目.它会为您提供两个命令行命令.连续使用它们.这些会将本地存储库添加到该位存储桶中. 第一个: git remote add origin https://example@bitbucket.org/example/test.git 第二个: git push -u origin master
  7. 再次添加git add -A
  8. 然后提交git commit -m "Second Commit"
  9. 最后一次按下git push origin master

  1. 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.
  2. Create new repository in the BitBucket account for the project, selecting git as the repository type.
  3. Now from the terminal window at the bottom of android studio, type: git add -A This will add the files to git for committing.
  4. 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.
  5. 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
  6. Add again git add -A
  7. Then Commit git commit -m "Second Commit"
  8. Push for the last time git push origin master

您可以通过写git status

在分支母版上 您的分支机构的最新信息是起源/母版". 没什么要提交的,正在工作的树干净

On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working tree clean

  • 完成. 我的Android Studio版本是2.3.3& git版本2.13.0.windows.1
  • Done . My Android Studio version was 2.3.3 & git version 2.13.0.windows.1
  • 这篇关于使用Bitbucket团队存储库配置Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆