How to add an Android Studio project to GitLab

Suragch
2 min readJan 12, 2019

This is a repost of an answer I wrote on Stack Overflow.

GitLab is a git repository site similar to GitHub.

1. Create a new project on GitLab

Chose the + button on the menu bar. Add a project name and then click "Create project".

This will give you a new project address. Choose the https version.

It will look something like this:

https://gitlab.com/MyUserName/my-project.git

2. Create a Git repository in Android Studio

In the Android Studio menu go to VCS > Import into Version Control > Create Git Repository…

Select the root directory of your project. (It will be automatically selected if you already have it highlighted in the Project view. Otherwise you will have to browse up to find it.)

3. Add remote

Go to VCS > Git > Remotes…. Then paste in the https address you got from GitLab in step one.

--

--

Suragch
Suragch

Written by Suragch

Flutter and Dart developer. Twitter: @suragch1, Email: suragch@suragch.dev

Responses (3)