This article is for github beginners or for those who find it difficult to upload android projects on github.
- Install Git on your computer
Visit this official site to download git on your computer. Once you do that, you can start using it with android studio.
2. Enable Version Control Integration on android studio
Go to Menu>VCS>Enable Version Control IntegrationAfter that,select Git as your version control system
> On doing this,you will notice that all your files will turn red.
3. Share on Github
Now ,go to VCS>Import into Version Control>Share project on Github
Now give a name to your repository and write a description if you want.
4. Push your project files on Github
Now select the files you want to share and press Ok. You can also write a specific commit message and after you do so,all your files will turn white.
5. Make changes
Your project is now under version control and shared on Github,you can start making changes to commit and push. You can see I added a new ImageView reference to the MainActivity.java. Notice that after I made the change, the MainActivity.java file turned blue. That means the file now has uncommitted changes (and it doesn?t match the file in the Github repository).
6. Commit and Push
Its upto you now when you want to do commit and push. You can do it after every new change or after a lot of changes.
To commit and push,go to Menu>VCS(with green up arrow)
After that,you will see a commit changes window and you have to write a commit message (mandatory) and then press on commit and push.
After that,you will see another push window. Just press on push button and all your changes will be reflected in you repository.
Congratulations on setting up your first project with version control.Yayyyyy!!!
I am a recipitentof Udacity?s Google India challenge scholarship and I wrote this article to help my peers. Do clap if you find this useful.