Basheer AL-MOMANI Basheer AL-MOMANI - 1 year ago 141
Android Question

Contribute on GitHub using Android Studio

I'm not new to using GitHub on Android Studio, but:

This is my first try to contribute to a sample project for Android on GitHub.

I did the following

  1. I cloned the repository:

Android Studio UI

  1. I made my changes

  2. I committed my changes

Enter image description here

  1. I pushed my commit

And baam (here is the problem):

Enter image description here

Why? What things did I miss?

(Don't forget, I have never contributed on GitHub, and this is my first time.)

Answer Source

First of all, to do a contribution:

  1. You must fork the repository
  2. Clone your fork version of that repository
  3. Through the command line, navigate to your clone directory then add upstream version (original repository):

    $ git remote add upstream

    You can check it using the line $ git remote, and you will see origin and upstream.

  4. Make changes → commit them → then push (all of this happen on your repository (forked one), not the upstream).

  5. Go and check the network graph for both the forked and original repositories.

  6. Go to the GitHub original repository's link and click pull request.

  7. Do as described in this image: Enter image description here

  8. And fill the others field and click Create pull request

Thanks for Erik Carlsten's tutorials.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download