> For the complete documentation index, see [llms.txt](https://data-to-production.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://data-to-production.gitbook.io/product-docs/fundamentals/getting-started/step-1-github/working-with-git-and-github/pull-request.md).

# Pull Request

### GUIDELINE FOR PR:&#x20;

Here are few things to check before creating a PR, then when you are working on new features to add to your main (production) branch through merge and finally after merging PR:

1. First create an issue -> "**issues**" tab -> write an issue for your task

<figure><img src="/files/i1pfRdCI4s1h7vh9h4R8" alt=""><figcaption></figcaption></figure>

2. Create a new branch and start coding

```sh
$ git checkout -b dev1
```

<figure><img src="/files/fiMO490WDg3bfG0y9ROD" alt=""><figcaption></figcaption></figure>

3. Push changes to the respective branch

```sh
$ git add <files>
$ git commit -m "useful msg"
$ git push origin dev1
```

4. When done with all coding and ready to push to production -> Create a **pull request (PR)**

<figure><img src="/files/UPRGnnh3nRefM01eulEP" alt=""><figcaption></figcaption></figure>

5. You can still continue to code and push changes to your branch after creating PR until the PR is merged by you
6. To include a brief code prefix such as "**ENH:**" in step 1, please refer to the end of this documentation [here](#short-codes-prefixes). \
   Step 3 involves adding **reviewers** for the code review, and in step 4, *linking the issue* under "**Development**". Upon ***approval*** of the code review, proceed to step 5 and **merge** the **PR**.&#x20;

<figure><img src="/files/98pbRT4Z7d5P6xAg4vR9" alt=""><figcaption></figcaption></figure>

7. Delete branch on PR

<figure><img src="/files/rJLUpYCJq3M4k6jNpbwi" alt=""><figcaption></figcaption></figure>

8. Go to your local repo on your laptop -> switch to main branch -> pull new changes that is now on your main (production) branch on remote repo to your local repo -> then delete the same branch locally

```sh
$ git checkout main
$ git pull origin main
$ git branch -d dev1
```

<details>

<summary>Short Codes Prefixes:</summary>

* API: an (incompatible) API change&#x20;
* BLD: change related to building numpy&#x20;
* BUG: bug fix DEP: deprecate something, or remove a deprecated object&#x20;
* DEV: development tool or utility&#x20;
* DOC: documentation&#x20;
* ENH: enhancement&#x20;
* MAINT: maintenance commit (refactoring, typos, etc.)&#x20;
* REV: revert an earlier commit&#x20;
* STY: style fix (whitespace, PEP8)&#x20;
* TST: addition or modification of tests&#x20;
* REL: related to releasing numpy

</details>
