This document is a brief step-by-step guide on creating pull requests for Apollo. Your can also refer to GitHub: Using Pull Requests for a thorough understanding.
This is done by clicking the "Fork" button on the top-right of Apollo's Github Page and following the guide there.
Note:
Please replace "YOUR_USERNAME" with your GitHub account in the descriptions below.
Open a terminal, type either of the following commands:
# Using SSH
git clone [email protected]:YOUR_USERNAME/apollo.git
# Using HTTPS
git clone https://github.com/YOUR_USERNAME/apollo.git
git config user.name "My Name"
git config user.email "[email protected]"
Configuring an upstream remote allows you to sync changes made in the upstream with your own fork.
This is done with the following command:
# Using SSH
git remote add upstream [email protected]:ApolloAuto/apollo.git
# Using HTTPS
git remote add upstream https://github.com/ApolloAuto/apollo.git
You can confirm that the upstream repo has been added by running:
git remote -v
If successful, it will show the list of remotes similar to the following:
origin [email protected]:YOUR_USERNAME/apollo.git (fetch)
origin [email protected]:YOUR_USERNAME/apollo.git (push)
upstream [email protected]:ApolloAuto/apollo.git (fetch)
upstream [email protected]:ApolloAuto/apollo.git (push)
git checkout -b my_dev origin/master
# Make your own changes on branch "my_dev"
# blah blah ...
# Commit to your own branch with commit msg:
git commit -m "[module] brief description of the changes"
git pull --rebase upstream master
git push -f -u origin my_dev
Create a new pull request between "Apolloauto/apollo:master" and "YOUR_USERNAME/apollo:my_dev" by clicking the "Pull Request" button on your forked Apollo repo page on GitHub.
You can then follow the steps described by GitHub: Creating a Pull Request on what to do next.
Note:
Please don't forget to add the description of your PR. It can help reviewers better understand the changes you have made and the intention for those changes.
Collaborators from our team will be glad to review and merge your commit! (This may take some time, please be patient.)
Thanks a lot for your PR!