- Keep a serialized, linear history of the master branch in the ASF repo.
- Each commit would have a dedicate JIRA ticket, unless the change is trivial.
Fork the ASF repo
git clone https://git-wip-us.apache.org/repos/asf/incubator-quickstep.git quickstep
- git submodule update --init
Work on a new feature
- Create a JIRA ticket at https://issues.apache.org/jira/browse/QUICKSTEP. Let's assume the JIRA ticket is identified as:
git checkout master
git checkout -b quickstep-101
git add some-changed-or-new-files
- Then test your changes doing at least the following:
Check if your code confirms to the code guidelines by running the following command from the root of the quickstep source directory:
- Check for CMake validation errors by running the following command from the root of the quickstep source directory:
- Check for cyclic dependencies by running the following command from the root of the quickstep source directory:
- From the build directory, run all the tests using the command: test -j8
- If you have made changes to the parser to add new tokens and/or grammar rules, please run the script
parser/genfiles.shand check the generated files into the directory
git commit -m "QUICKSTEP-101: Added My Awesome Feature."
git push origin quickstep-101
Sometimes, there may be code review comments after a PR has been opened. Address these comments and then do the following:
git add more-changed-or-new-files
git commit -m "Addressed Review Comments."
Finally, once the PR is ready to be merged (i.e. it has passed all the tests and the python validation scripts as described above), we need to squash all the commits into one commit. We cherry pick the first commit, and squash all the rest as follows:
git rebase -i origin/master
- In the editor, you should see something like:
pick QUICKSTEP-101: Added My Awesome Feature.
pick Addressed Review Comments.
- While still in the editor, modify the second line to the following.
s Addressed Review Comments.
- While still in the editor, modify the squashed commit messages if needed.
- Check the git log using:
- Check the "Author" field in the last commit with the intended name and email. Amend if needed.
- Now you are ready to push the code. You can do that using:
git push origin quickstep-101 -f
Use the GitHub ASF mirror repo: https://github.com/apache/incubator-quickstep, and set the title for the PR to match the title of the JIRA ticket.
In this case,
QUICKSTEP-101: Added My Awesome Feature.
Merge a PR
To merge a PR, go through the following steps: