简体   繁体   English

从 ssh Git (bitbucket) 链接创建 android studio 项目

[英]Create android studio project from ssh Git (bitbucket) link

I was given a ssh link to a bitbucket repo so I can work on the project.我获得了一个指向 bitbucket 存储库的 ssh 链接,因此我可以在该项目上工作。 The link someone gave me was something like ssh://git@bitbucket.CompanyName.tools/sp/company-project.git.有人给我的链接类似于 ssh://git@bitbucket.CompanyName.tools/sp/company-project.git。

How would I create an android studio project, linked to this repo, to work on this project and view the files?我将如何创建一个链接到这个 repo 的 android studio 项目来处理这个项目并查看文件? I have never worked with git so this is all new.我从未使用过 git,所以这是全新的。 I do not see the repo in my main bitbucket account if it makes any difference or not如果有什么不同,我在我的主要 bitbucket 帐户中看不到 repo

  1. Create clone of the given repo by entering below command in your terminal :通过在终端中输入以下命令来创建给定 repo 的克隆:

git clone ssh://git@bitbucket.CompanyName.tools/sp/company-project.git git clone ssh://git@bitbucket.CompanyName.tools/sp/company-project.git

  1. After cloning checkout to new branch by :通过以下方式将结帐克隆到新分支后:

git checkout -b newBranchName git checkout -b newBranchName

  1. Last step, go in your Android Studio , and Import the folder where you have clone the given repo.最后一步,进入您的Android Studio ,并导入您克隆给定存储库的文件夹。

In Android Studio go to:在 Android Studio 中转到:

File->New->Project from Version Control->Git

then in the dialog enter the link provided in your question ssh://git@bitbucket.CompanyName.tools/sp/company-project.git然后在对话框中输入问题中提供的链接ssh://git@bitbucket.CompanyName.tools/sp/company-project.git

File > New > Project From Version Control > Git就是你所需要的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM