> 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="https://95207656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjyxEyaBGhRnoJSaZDPz%2Fuploads%2FRyG0oM297bQfdfGf552S%2FScreenshot%202023-04-04%20at%2023.56.37.png?alt=media&amp;token=433e1181-993f-47eb-b806-008a54a9401c" alt=""><figcaption></figcaption></figure>

2. Create a new branch and start coding

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

<figure><img src="https://95207656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjyxEyaBGhRnoJSaZDPz%2Fuploads%2FXzSkwsNNBkid3Fvu4qpk%2FScreenshot%202023-04-05%20at%2000.02.51.png?alt=media&amp;token=17dd0ebf-0c7c-483e-9f07-aa9b2edd0ce7" 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="https://95207656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjyxEyaBGhRnoJSaZDPz%2Fuploads%2F2qoIICCT4DosJz6PfPwh%2FScreenshot%202023-04-05%20at%2000.08.08.png?alt=media&amp;token=c0e6ff13-c1f4-40e6-b191-be7e4c0809d3" 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="https://95207656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjyxEyaBGhRnoJSaZDPz%2Fuploads%2FqmyqC4l7l7Hba5Jz2xm3%2FScreenshot%202023-04-09%20at%2013.22.24.png?alt=media&amp;token=2ab12dad-e08c-4047-81c1-28a000fbf367" alt=""><figcaption></figcaption></figure>

7. Delete branch on PR

<figure><img src="https://95207656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFjyxEyaBGhRnoJSaZDPz%2Fuploads%2F5CkCjVg6nIG8OsmvNQw9%2FScreenshot%202023-04-05%20at%2000.14.44.png?alt=media&amp;token=fc8a559d-b51a-4b44-b5ab-79f77df69e28" 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>
