Create android studio project from ssh Git (bitbucket) link - android

I was given a ssh link to a bitbucket repo so I can work on the project. The link someone gave me was something like 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? I have never worked with git so this is all new.
I do not see the repo in my main bitbucket account if it makes any difference or not

Create clone of the given repo by entering below command in your terminal :
git clone ssh://git#bitbucket.CompanyName.tools/sp/company-project.git
After cloning checkout to new branch by :
git checkout -b newBranchName
Last step, go in your Android Studio, and Import the folder where you have clone the given repo.

In Android Studio go to:
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

File>New>Project From Version Control>Git is what you need

Related

how connect myProject to mainProject on github (Android Studio)

in the past, I did not download the telegram source with the git but now i need update my source and I need connect myProject (my Unofficial Telegram), to mainProject (Telegram) on github. my IDE is Android Studio. git in Android Studio is in VCS menu. but I do not know what to do, for conect my project to github project.
Make sure you have git installed on your system. If not, go to this link and download it
https://git-scm.com/download/win
Right click inside your local project folder and select 'Git Bash Here'
(If you want to clone your entire GitHub project into your local project, do it by typing:
git clone https://github.com/DrKLO/Telegram.git
If you already have the files and you just want to update it, skip this cloning step)
Check if your project folder has .git folder in it. (Check the hidden folders too) If there isn't one, type the following in your GitBash window
git init
Add the link to your GitHub (remote origin) by typing
git remote add origin https://github.com/DrKLO/Telegram.git
Update your files with the GitHub source by typing
git pull origin master
If you just want to know how to connect your project in Android Studio to GitHub, here's a simple tutorial:
https://www.londonappdeveloper.com/how-to-use-git-hub-with-android-studio/
(Skip the steps where he creates a new GitHub repository and an Android Studio project, since you already have both)
For detailed understanding on using git and github, i suggest you take this course:
https://in.udacity.com/course/how-to-use-git-and-github--ud775

Pulling A Commit from BitBucket in Android Studio 2.2.2

I recently upgraded to Android Studio 2.2.2. I have several commits in BitBucket, but I want to pull a specific commit into a new Android Studio project.
I understand there is a BitBucket plugin, however I do not see any way to install the plugin in Android Studio 2.2.2. I also know that there are 2 methods of cloning in Git: SSH and HTTPS. Not sure which one to use or what the best method of pulling a specific commit would be. Any help would be appreciated!
I can't help you with Android Studio and Bitbucket plugin, but the following information may be useful for you.
SSH or HTTPS. I recommend to use SSH method, in this case you should never enter your password for connect with Bitbucket server. See https://stackoverflow.com/a/40632487/637589
After you've cloned the repository you have master as a current branch. If you want just review all files in specific commit use this command line:
git checkout <your-commit-SHA1>
If want to work (change, commit and so on) basing on this commit - you need to create a new branch:
git checkout <your-commit-SHA1> -b <name-of-new-branch>
I believe you can do the same things using any git plugin to Android Studio
There is nothing special about BitBucket. It's a regular git repository. I don't think you need a plugin.
First, setup your project with git (there are many tutorials on the internet). The way I do it:
Create new repository on BitBucket
open command line and go to the path where you want your new project
type git clone {git url} (you can find it in BitBucket under Overview: git#bitbucket.org:../...git)
open this newly created folder in Android Studio
If you want to checkout a specific commit you can do it in the command line:
git checkout <commit-SHA1>
Or you can do it in Android Studio. Click on the Version Control and you'll see all the commits:
Right-click on your specific commit and select Checkout revision.

How can i compile kobotoolbox/odk collect in Android Studio?

I have a basic understanding of git and i have been using Github and Bitbucket
I was trying to get the source from
Github!
but i do not understand the given instructions in the read me.I have done my research , but i have found no solutions.
Things i have tried include
Importing the project into Android Studio
Copy pasting the source code into a new project
I have figured out the process, Here are the steps if any one requires them
Launch Git console
Make a new directory mkdir [directory name]
Change to that directory cd [directory name]
Clone the repos
git clone https://github.com/opendatakit/google-play-services.git
git clone https://github.com/opendatakit/collect.git
git clone https://github.com/opendatakit/gradle-config.git
These will automatically set these projects to the tip of master.
Now change gradle-config to be at the version required by collect/settings.gradle (e.g., 40)
cd gradle-config git checkout 40
(4) Open Android Studio ...New /Import Project... collect/build.gradle

Bitbucket with android :"Can't publish part of repository" error

I have recently use Android studio and I was just try to connect bitbucket with it.
I don't want manually bitbucket by terminal thas why I googling it. find some links link .
I have follow all the steps install plugin>shareproject>login>private>share project
and than error. I checked my bitbucket but no repositary created.
Can't publish part of repository
Invalid VCS root mapping The directory
ExpandableLayout-master\TestProject is
registered as a Git root, but no Git repositories
I don't know is thare error of plugins of bit bucket or my android studio
After to much research... finally i got answer
Actually it is bug of bit-bucket plugin. bit-bucket bug
Here is solution given by AKAMUZA in above link thanks bro.
(1)Go to project folder and delete .git folder
(2) IDEA pops up an error message about project not being under version control and an option to configure it. Press Configure and just delete the path to your project in VCS section.
(3)After this Import into version control -> Share project works like a charm.
UPDATE
I Found many developer having issue after use plugin directly from Android studio and if It not work you can download below plugin
https://bitbucket.org/dmitry_cherkas/jetbrains-bitbucket-connector/downloads/jetbrains-bitbucket-connector_IC-139.224.zip
Go to Setting-> Plugin-> Install plugin From disk ->above downloaded plugin -> install & resatart.
You can feel Magic after restart :P
I have the same problem with android studio.
this is my suggested solution:
go to project root folder
then open a terminal in this folder:
git init
git add --all
git commit -m "your message"
then go to bitbucket and create new repository then choose "I have an existing project" ...
Now you can use plugin to push/update
This thread mentions (assuming that File > Settings > Version Control is set to "git"):
You could instead have navigated into the directory via a terminal or shell and typed 'git init'. That would have converted that directory into a git repository.
So check if ExpandableLayout-master\TestProject has or has not yet a .git subfolder in it.
If not, it means you have declared that path as a git repo, but locally, on your disk, that folder is not yet a git repo. If so, you can initialize it, add a remote pointing to an empty bitbucket repo and push.

Git on Windows 7 for Android in Eclipse: How do I use version-control on existing project?

How do I take my existing project in Eclipse on Windows for Android and put it inside a branch on a repository for Git? I also want to share this repository with my friend to help code. He already set up a Git repository and sent me the address and credentials. I just don't know how to go about this?
Once I get a cmd line for Git on Windows what do I have to do to add/clone this project to my friends repo or my own (then how do I share my repo with him?). I use Git with GitHub in Ubuntu (I didn't set it up) but I don't really know how to set this up.
I've already installed a plug-in egit and have had issues with that. I would like to use a separate interface from Eclipse for Git now.
Bones of the Question: How do I get my existing Android project into a Git repository that IS NOT a plug in to Eclipse?
Download msysgit from http://code.google.com/p/msysgit/
Download TortiseGit https://tortoisegit.org/. If you're using private keys, make sure you select Plink instead of openssh. I've had problems with OpenSSH for Windows.
Add your private key, if you're using it, to Pageant (included with Tortise Git).
Clone your repository with Tortise Git.
Copy all your files into the new directory.
In the Tortise Git context menu, select Add.
Select All
Commit
Push
That would be the short instructions.
Also, if you're comfortable with the command line tools, msysgit includes Git Bash, which is kinda like using Git in Linux.
http://nathanj.github.com/gitguide/tour.html this is a nice tutorial on a gui version of git. in your case you would do a git clone from the existing url that your project is stored in or create a new repository if you havent set one up on github yet.

Categories

Resources