From f246e63b2781c88695a8c8887d8612a3a83ab7ff Mon Sep 17 00:00:00 2001 From: urvangjoshi Date: Wed, 25 Jul 2018 10:28:59 -0700 Subject: [PATCH] libaom: Add README explaining how to create a PR. (#1651) * libaom: Add README explaining how to create a PR. This may be a standard process for oss-fuzz and/or github in general, but it's non-trivial for folks on libaom team, and has been found to be essential by others in the team. * Escape angle brackets and capital --- projects/libaom/README.md | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 projects/libaom/README.md diff --git a/projects/libaom/README.md b/projects/libaom/README.md new file mode 100644 index 000000000..5d90b688c --- /dev/null +++ b/projects/libaom/README.md @@ -0,0 +1,52 @@ +# Submit a Patch to oss-fuzz repo + +## One-time Setup + +1. Create github account if needed (with @google.com email address, preferably) + and log in. +1. To allow “git push” to work, you’ll have to add an SSH key: + https://help.github.com/articles/connecting-to-github-with-ssh/ +1. Go to https://github.com/google/oss-fuzz and click on “Fork”. +1. Go to your own fork of the repo, which will be at + https://github.com/\/oss-fuzz +1. Click on “clone or download” and pick “Clone with SSH” method (I found that + easier to use for “git push”). Then copy that URL and run “git clone \” + in terminal. Now you have a local repo, and **your fork** of the remote repo + will be called “**origin**” in your git config. +1. Configure a remote repo pointing to the **upstream repo** + (https://github.com/google/oss-fuzz) so that it’s called “**upstream**”: + * cd \/oss-fuzz + * git remote add upstream git@github.com:google/oss-fuzz.git + * git remote -v + +NOTE: For trivial changes it's possible to edit the files in the web UI on the +main project and create a commit + pull request from that. + +## Workflow for a Pull Request (Patch) + +1. Go to your repo: + * cd \/oss-fuzz +1. Create a new branch: + * git checkout master + * git checkout -b new_feature_xyz +1. Make your changes and commit them locally with “git commit” +1. Push your changes to your fork on github + * git push -u origin HEAD + * (This will create a branch of the same name “new_feature_xyz” on your + fork “origin”). +1. Open your fork in browser and click on “Compare & pull request” and follow + the prompts. +1. If changes are requested to the patch: + * make changes to the same local branch + * commit them locally with “git commit” (but DO NOT amend!) + * git push -u origin HEAD +1. Once pull request is closed: + * Delete “new_feature_xyz” branch on your fork using the “Delete branch” + button on the pull request + * Delete local “new_feature_xyz” branch locally with “git checkout master + && git branch -D new_feature_xyz” + * Sync your local repo and your fork with upstream repo: + * git checkout master + * git fetch upstream + * git merge upstream/master + * git push origin master