M
M
MOSIP Docs 1.2.0
Search…
Code Contributions

Overview

The recommended Github workflow here is for developers to submit code and documentation contributions to MOSIP open source repositories.

Setup

  1. 1.
    Fork MOSIP repository of interest from https://github.com/mosip/
  2. 2.
    Clone the fork to your local machine. E.g.:
    1
    $ git clone https://github.com/<your_github_id>/commons.git
    Copied!
  3. 3.
    Set upstream project as the original from where you forked. E.g.:
    1
    $ cd commons
    2
    $ git remote add upstream https://github.com/mosip/commons.git
    Copied!
  4. 4.
    Make sure you never directly push to upstream.
    1
    $ git remote set-url --push upstream no_push
    Copied!
  5. 5.
    Confirm the origin and upstream.
    1
    $ git remote -v
    Copied!

Code changes

  1. 1.
    Create a new issue in MOSIP Jira.
  2. 2.
    You may work on master, switch to a branch (like Release branch) or create a new branch.
  3. 3.
    Make sure you are up-to-date with upstream repo.
    1
    $ git pull upstream <branch>
    Copied!
  4. 4.
    Once you are done with the work, commit your changes referring to Jira number in the commit message. Eg:
    1
    $ git commit -m "[MOS-2346] Adding new upload feature in Pre-registration module for POA documents"
    Copied!
  5. 5.
    Once again ensure that you are up-to-date with upstream repo as it may have moved forward.
    1
    $ git pull upstream <branch>
    Copied!
  6. 6.
    Build and test your code. Make sure it follows the coding guidelines.
  7. 7.
    Push to your forked repo (origin).
    1
    $ git push
    Copied!
  8. 8.
    Create a pull-request on your forked repo. Direct the pull-request to master or any specific branch on upstream (like a Release branch).
  9. 9.
    Make sure the automatic tests on Github for your pull-request pass.
  10. 10.
    The pull-request shall be reviewed by reviewers.
Export as PDF
Copy link
Edit on GitHub