Question Detail

How do you synchronise projects to GitHub with Android Studio?

6 years ago Views 1909 Visit Post Reply

I am trying to Upload Android Project to Github with the help of Android studio after Android studio 2.0 Git added with Android Studio officially, but I don't have any idea how can I up my project in GitHub repository through Android Studio Updated Version?Image result for github android studio 

Thread Reply

Hemant Sharma

- 6 years ago

1. Test if Git is Configured

In Android Studio, go to ‘File’ –> ‘Settings(Ctrl+Alt+S)’ –> ‘Version Control’ –> ‘Git’. Then click ‘Test’ to ensure that Git is configured properly in Android Studio. You will get the version name and message on successful test.



or,  Alternatively, you can use Terminal command:

git   – – version

2. Login to your GitHub Account

Now, go to ‘File’ –> ‘Settings(Ctrl+Alt+S)’ –> ‘Version Control’ –> ‘GitHub’.

Add you GitHub credentials. And then click ‘Test’ to ensure that GitHub connection.


Screenshot from 2016-04-08 20:43:06

3. Enable Version Control Integration

Select  ‘VCS’ –> ‘Enable Version Control Integration…’  to enable version control for the current project.

Screenshot from 2016-04-06 21:57:26

Choose the version control system for your project.

Screenshot from 2016-04-06 21:50:09

4. Share project on your VCS

got to ‘VCS’ –> ‘Import into Version Control’ – >   ‘Share Project on GitHub’  for creating a repository on GitHub.

Screenshot from 2016-04-06 21:51:24

Choose a repository name for your project.

Screenshot from 2016-04-06 21:51:58

An automated dialog will allow you to add files for the initial commit.


Screenshot from 2016-04-06 21:52:15

Pressing OK will automatically create the repository, add chosen file and share the project with GitHub.

Here is the sample repository created along with changes done in initial commit.


Screenshot from 2016-04-06 21:53:26

5. Make Changes in the file and pushing to the repository

If we want to reflect any changes to our repository done in the project.

5.1 Git Add and Commit.

to add any changes made, press VCS commit changes button (Ctrl +K) this will automatically add all the files after ignoring from the list of file mentioned in .gitignore.


Screenshot from 2016-04-07 22:08:58


Screenshot from 2016-04-06 21:54:48

5.1 Git Push.

to push all the files to the server Github repository, go to ‘VCS’ –> ‘Git’ – >   ‘Push…’ or press (Ctrl + Shft +k).


Screenshot from 2016-04-06 21:55:03


Congrats files are successfully pushed.

here is sample image of the project uploaded to the repository created by ourselves.

Screenshot from 2016-04-06 21:55:38

That’s all folk. Stay Updated.

Reffrance From :