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

查看:33
本文介绍了使用 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".

推荐答案

不使用任何插件

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

在分支主您的分支是最新的 'origin/master'.没什么可提交的,工作树很干净

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 团队 repo 配置 Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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