Overview of the Pull Request Lifecycle - subramen/pytorch GitHub Wiki
Like many open source projects, PyTorch uses a workflow based on pull requests. You will create a copy of the repository in your Git branch, make your changes and test it, push those changes to your fork (origin
), and create a pull request (PR) against the official repo (upstream
).
You should have
-
Find or create a new issue to work on. If your change is minor (like fixing a typo) feel free to skip this step.
-
Create a new branch with
git fetch && git checkout -b <my-branch-name> 'viable/strict'
(more details on 'viable/strict'). -
Make changes locally to the code.
-
Test your changes locally with
python ./test/test_torch.py
(more details) and review other pre-commit checks. -
Push changes to your fork
git push
- If your changes are tracking an older version of PyTorch, rebase and push
git pull --rebase upstream viable/strict git push -f
-
Create a new Github PR to propose changes from your fork into the official PyTorch repo.
-
Review, address comments on your PR, and initiate merge along the pull request workflow.
-
Celebrate your contributions and welcome to the PyTorch Developer community :)