Github : Getting Started in Android Studio

If you have just heard about github and dont even know the basic stuffs about gihub you might want to check my introduction post for github. If you know something about it, then cheers and lets get started.

 

You need to create a github account to use its services. Navigate to this link to create a github account. You can choose a free plan at the beginning

ccc.PNG

Tada! you are now authorized to use GitHub. In this post I am going to describe how to use GitHub with Android Studio. Android Studio has built in plugin that supports previously discussed github functionalities. Open a project in Android Studio and navigate to VCS menu and click on Enable Version Control Integration and select Git.

ff.PNG

Committing Changes

To ‘Commit‘ changes in Android Studio you can just click on Commit Changes under VCS menu or press Ctrl+K . (If you haven’t done anything and still want to commit and push you can Click on Git under VCS and click Add) After clicking commit you can see below screen.

cccc.PNG

Here you can select the committing author, choose the files to commit and enter committing messages explaining what changes you have made in these files.

Creating repository in GitHub

You can create a new repository on GitHub either from GitHub website or from Android Studio. To create a repository click ‘Import Into Version Control’ and click ‘Share Project on GitHub’ . Now you need to enter your GitHub credentials in the next screen.

12.PNG

Enter your username and password and click Login. After successfully logging in you can now see the following screen.

13.PNG

Enter your repository name and click share. After finishing the sharing process you can see your project on your GitHub profile.

133.PNG

Now you have your project on GitHub website, you can push or pull your project anytime you want.

Push

To push your project to your repository, commit the changes and navigate to CVS >> Git >>Push. You can choose the files you want to push or you can select them all.

44.PNG

Click on Push and you’re done.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s