Upload Project on GitHub From Android Studio

Upload Project on GitHub From Android Studio

ยท

2 min read

GitHub is the best place to showcase your projects and contribute to open-source projects.

In this tutorial, we will learn about how to publish the android project to GitHub from Android Studio.

Install Git

Firstly, we need a Git installed on a computer. Download the Git from this link https://git-scm.com/ and install it.

Enable VCI on Android Studio

Open the Android Studio and enable Version Control Integration from the following menu VCS->Enable Version Control Integration. It will open the dialogue box. image.png

Now select Git as a version control system to associate with the project root. Once the VCI is enabled we can see the change in the colour of project source files, these colours are associated with the status of the files for the version control system.

image.png

Share Project on GitHub

To upload the project on GitHub got to VCS->Import into Version Control->Share Project on Github it will ask for some information regarding the repository.

image.png

In the newly opened panel for repository details enter the name of the repository and add some description and click on the Share button.

image.png

In this step select the files that you want to upload on the GitHub repository and add a commit message and click on Add button, It will start uploading the project.

image.png

Once the project is uploaded successfully it will show a message at the right bottom corner with the hyperlink of the project link. You can click on that link to open the GitHub link on the browser to actually see that project on GitHub. image.png

This is how your project will look like on GitHub. image.png

Update Project

Now make some changes and go to VCS->Commit to commit the changes, you can find this menu in the shortcut menubar and Ctrl+K is the shortcut to trigger this menu. image.png

After clicking on the commit, it will ask for a commit message and click on the Commit button. Now the committed version of the project is created but not updated on GitHub.

image.png

To update the local changes on the GitHub repository you need to go to VCS->Git->Push it will update the committed changes to GitHub image.png

Now it's time to try this out on your machine, go ahead share your awesome projects on GitHub ๐Ÿš€.

Thanks for reading!

Did you find this article valuable?

Support Road To Code by becoming a sponsor. Any amount is appreciated!

ย