Fork the ASF repo
- git clone https://git-wip-us.apache.org/repos/asf/incubator-quickstep.git quickstep
- cd quickstep
NOTE
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:
QUICKSTEP-101
.
- git checkout master
- git checkout -b my-awesome-feature
- 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:
python third_party/cpplint/lint_everything.py
- Clear the CMake validation by running the following command from the root of the quickstep source directory:
python validate_cmakelists.py
- Check for cyclic dependencies by running the following command from the root of the quickstep source directory:
python
cyclic_dependency.py
- From the build directory, run all the tests using the command: ctest
- git commit -m "QUICKSTEP-101:
- Add My Awesome Feature."
- git push origin my-awesome-feature
// Sometime we may have Sometimes, there may be code review comments after opening 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 are is ready to merge be merged (i.e. , passing it has passed all the CI teststests and the python validation scripts as described above), // we have need to squash all the commits into one commit. We cherry pick the first commit, // and and squash all the rest .as follows:$
- git rebase -i origin/master
- In the editor,
- you should see smoothing like:
// QUICKSTEP-101:
pick Add My Awesome Feature.
// pick Addressed Review Comments.
- While still in the editor, modify all the content (except to the first line) to "
s Addressed Review Comments.
".
// Check
- While still in the editor, check the "Author" field in the last commit with the intended name and email. Amend
- if needed.
- Check the git log using:
git log
- Now you are ready to push the code. You can do that using:
git push origin my-awesome-feature -f
Create a Pull Request (PR) for the new feature
Use the GitHub ASF mirror repo: https://github.com/apache/incubator-quickstep, and set the title for the PR to match the title with of the JIRA ticket.
In this case, QUICKSTEP-101:
Added Add My Awesome Feature
.
Merge a PR
//To merge a PR, go through the following steps:
- Update the local fork with the new branch my-awesome-feature.
git fetch origin
git checkout master
- Ensure that the PR is one commit
- with a well-written commit message.
git rebase -i origin/my-awesome-feature
- Now if we see "noop", we are good to merge. Otherwise,
- the committer should notify the PR
- submitter to rebase the branch to
- make it a single commit ahead the current master branch.
git log
- If we see a commit message like
- "
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/incubator-quickstep
",
- we should abort the merge; otherwise we will mess up the master history.
git push origin master
This command triggersasfgit
to merge the PR in GitHub ASF mirror repo.
git push origin
// It
--delete my-awesome-feature
This command triggersasfgit
to delete the merged branch.
- Close the JIRA ticket regarding this PR
NOTE
- by visiting: https://issues.apache.org/jira/browse/QUICKSTEP