How to Use GitHub for Android Application Development?

GitHub is a Git or version control repository hosting service site used mainly for programming. Here I’ll be showing step by step approach towards using GitHub while developing an android application. Developing Android applications demands teamwork. In such cases, situations would demand using GitHub.

Creating Account in GitHub

Click Here and Create A GitHub Account.

Creating a New Repository

1. Once you have an account in GitHub you can start using. To create a new repository, log in to github.com. Click on New Repository as shown below.

Add New Repository

 

2. Give your repository a name, for example, test_github. Keep the other fields as it is in default.
3. Click Create Repository

Create a new repository

4. Keep the browser on which you did the above steps and go to the next step.

Creating a New Android Project

1. Create a project in Android Studio (I make this assumption that you know how to create a new project in Android Studio).
2. Open the project if you have already created.
3. On the top menu, select VCS >> Import into Version Control >> Create Git Repository

Version Control

4. In the next screen pop up, click OK

Click OK

Using Git Bash

1. Using File Explorer, search for Git Bash. If you have not installed it, install it on your pc.
2. Locate where your android project is saved, right click and click Git Bash Here.

Git Bash

3. In Git Bash type and press Enter key,

git remote add origin [your GitHub repository link]

Bash

4. Now get back to Android Studio. Right-click on the root directory of your project, choose Git >> Add

Add project

5. Then, repeat step 4, choose Git >> Commit Directory. In the next screen type Commit Message and Click Commit.

6. Right-click on the root directory of your project, choose Git >> Repository >> Push. In the next screen click Push.

7. Finally, enter GitHub Login (email address) and password. And click OK.

Now your project is pushed to your GitHub repository.

Leave a Reply

Discover more from BHUTAN IO

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top