Submitting Pull Request to fastai V2
I am a Wiki thread! You can edit me.
Creating a PR using gh - the official GitHub CLI
- Create a conda environment with fastai2 requirements, include nbdev.
- Clone fastai2 repo to local
git clone https://github.com/fastai/fastai2
- Checkout to new feature branch (this is where new feature/bug-fix should be made)
git checkout -b <enter--relevant-feature-branch-name>
- Make changes to Jupyter Notebook (ie., add tests, update feature, add new feature, add documentation etc.)
- Save updated notebook
- Commit change
git commit -m "done with feature"
gh pr create -B master -b "enter body of PR here" -t "enter title"
This command will automatically create a fork for you if you’re in a repository that you don’t have permission to push to.
Note: Steps 1-4 need to be only performed once when you fork fastai2 for the first time. In subsequent PRs start from the step 5.
Confirm PR created
You can confirm that your PR has been created by running
gh pr list inside fastai2 folder of your computer. You can also check the status of your PR by running
gh pr status. More detailed documentation can be found here.
Updating a PR
If you want to change your code after a PR has been created you can do it by sending more commits to the same remote branch. For example:
git commit -m "updated the feature"
git push origin <enter-branch-name-same-as-before>
It will automatically show up in the PR on the github page.
If these are small changes they can be squashed together at the merge time and appear as a single commit in the repository.
Merging a PR
This is done by the project maintainers so nothing more for you to do, you’ll see a notification on github when the PR gets merged and closed.