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.
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.
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.
In the newly opened panel for repository details enter the name of the repository and add some description and click on the Share button.
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.
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.
This is how your project will look like on GitHub.
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.
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.
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
Now it's time to try this out on your machine, go ahead share your awesome projects on GitHub ๐.
Thanks for reading!