Connect my project to gitlab using android studio

my friend created a project on gitlab, when I enter gitlab, I look through the xxxxx / project project, if I click on it, I enter the project, and I can choose the ssh or httsp link. For example, the link https://gitlab.com/xxxxx/myproject.git If I click on the link to the repository: https://gitlab.com/xxxxx/myproject/tree/master there are three directories: client / myprojecty, Server / myserverproject, sketch / mysketchserver

The android project is in client / myprojecty, now I want to connect my local project, which is in C: // User / AndroiStudioProject / myproject with the client / project, and I want to use android studio.

I do not want this client / myproject to overwrite my local project. C: // User / AndroidStudio / myproject

How can I work with android studio?

I try when starup android studio: Quit Project Control then I press git Then open the dialg Clone Repository, where there is a text box to fill in:

Git Reposiroy Url: https://gitlab.com/xxxxx/myproject.git Parent directory: C: // User / AndroiStudioProject / myproject Directory name: myproject

I did not click the clone because I am afraid that this command will overwrite my local project and delete all the results in my local project.

How can I connect only my local project with a gitlab project? Then how do I update my progress?

+4
1

( , )

Android

   git init

git. , :

git remote add origin [the address of your remote repo]

:

git add .

, :

git commit -m "first commit"

, :

git push -u origin master

- , .

+11

Source: https://habr.com/ru/post/1657478/


All Articles