From 1bb4278f270b6a866ad5a7a9f4b20e8dffdd4c5a Mon Sep 17 00:00:00 2001 From: Jiangtao Hu Date: Mon, 2 Apr 2018 01:59:04 -0700 Subject: [PATCH] doc: add how_to_create_a_pull.md --- docs/howto/how_to_create_a_pull.md | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/howto/how_to_create_a_pull.md diff --git a/docs/howto/how_to_create_a_pull.md b/docs/howto/how_to_create_a_pull.md new file mode 100644 index 00000000000..02703f36cda --- /dev/null +++ b/docs/howto/how_to_create_a_pull.md @@ -0,0 +1,42 @@ +How to create a pull request +========================== + +You can follow the standard [github approach](https://help.github.com/articles/using-pull-requests/) to contribute code. Here is one sample setup. + +- Fork a new repo with your GitHub username. +- Set up your github personal email and user name + +``` +git config user.name "XXX" +git config user.email "XXX@[XXX.com]" +``` + +- Add Apollo repository as upstream + +``` +git remote add upstream git@github.com:ApolloAuto/apollo.git +``` + +- Create a new branch, make changes and commit. + +``` +git checkout -b "my_dev" +``` + +- Sync up with the Apolloauto/apollo repo + +``` +git pull --rebase upstream master +``` + +- Push local developments to your own forked repository + +``` +git push -f -u origin "my_dev" +``` + +- Generate a new pull request between "Apolloauto/apollo:master" and "forked repo:my_dev" +- Collaborators will review and merge the commit. + +Thanks a lot for your contributions! +