When submitting a pull request (PR), please use the following guidelines:
https://github.com/druid-io/druid/fork
git clone git@github.com:<username>/druid.git
replace <username>
with your GitHub username.
git remote add upstream https://github.com/druid-io/druid.git
If you already have a copy, fetch upstream changes
git fetch upstream
git checkout -b feature-xxx remotes/upstream/master
git commit -a
git pull --rebase
git rebase -i upstream/master
This will open your editor and allow you to re-order commits and merge them:
s
(squash) or f
(fixup) to merge extraneous commits.git push origin feature-xxx
Go to your Druid fork main page
https://github.com/<username>/druid
If you recently pushed your changes GitHub will automatically pop up a Compare & pull request
button for any branches you recently pushed to. If you click that button it will automatically offer you to submit your pull-request to the druid-io/druid repository.
Repeat steps 5. through 7. to address any code review comments and rebase your changes if necessary.
Push your updated changes to update the pull request
git push origin [--force] feature-xxx
--force
may be necessary to overwrite your existing pull request in case your commit history was changed when performing the rebase.
Note: Be careful when using --force
since you may lose data if you are not careful.
git push origin --force feature-xxx
Never fear, if you occasionally merged upgstream/master, here is another way to squash your changes into a single commit
feature-xxx-unclean
git branch -m feature-xxx-unclean
feature-xxx
from upstream. This branch will supercede our old one.git checkout -b feature-xxx upstream/master
feature-xxx-unclean
and create a single commit.git merge --squash feature-xxx-unclean git commit
git push origin [--force] feature-xxx:feature-xxx