> For the complete documentation index, see [llms.txt](https://docs.mosip.io/1.2.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mosip.io/1.2.0/mosip-docs-1.1.5/contribute/coding-standards/github-workflow.md).

# Gitub Workflow

### Purpose

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

### Setup

1. Fork MOSIP repository of interest from <https://github.com/mosip/>
2. Clone the fork to your local machine. Eg:

   ```
   $ git clone https://github.com/<your_github_id>/commons.git
   ```
3. Set upstream project as the original from where you forked. Eg:

   ```
   $ cd commons
   $ git remote add upstream https://github.com/mosip/commons.git
   ```
4. Make sure you never directly push to upstream.

   ```
   $ git remote set-url --push upstream no_push
   ```
5. Confirm the origin and upstream.

   ```
   $ git remote -v
   ```

### Code changes

1. Create a new issue in [MOSIP Jira](https://mosip.atlassian.net/).
2. You may work on `master`, switch to a branch (like Release branch) or create a new branch.
3. Make sure you are up-to-date with upstream repo.

   ```
   $ git pull upstream <branch> 
   ```
4. Once you are done with the work, commit your changes referring to Jira number in the commit message. Eg:

   ```
   $ git commit -m "[MOS-2346] Adding new upload feature in Pre registration module for POA documents"
   ```
5. Once again ensure that you are up-to-date with upstream repo as it may have moved forward.

   ```
   $ git pull upstream <branch> 
   ```
6. Build and test your code. Make sure it follows the coding guidelines.
7. Push to your forked repo (origin).

   ```
   $ git push 
   ```
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. Make sure the automatic tests on Github for your pull-request pass.
10. The pull-request shall be reviewed by reviewers.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mosip.io/1.2.0/mosip-docs-1.1.5/contribute/coding-standards/github-workflow.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
