GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Git Pull Request |
20190625 After forking a repository, cloning it locally, making changes to the repository, and committing those changes to your fork, a pull request can be submitted to have the changes considered for inclusion in the original repository's code base. Below we illustrate getting ready to submit the pull request. The github interface provides a Pull Request button that can be used to create the pull request once you are ready.
To begin, fetch the upstream main and merge that with your repository's main branch. The checkout here simply ensures the main branch is the active branch:
$ git fetch upstream $ git checkout main $ git merge upstream/main |
If there were any new commits then rebase your local repository. This may be in a development branch if you wish, but that is optional.
$ git checkout newfeature $ git rebase main |
On the github interface change to the branch to be merged and click on Pull Request.