Skip to main content

Squashing Commits

When submitting a pull request to RDF4J, we ask that you squash your commits before we merge.

On the command line, the process is as follows:

  1. Make sure your local master and develop branches are up to date with the upstream.
  2. Check out your pull request branch.
  3. Run git rebase -i master (or git rebase -i develop if your PR is against the develop branch).
    You should see a list of commits, each commit starting with the word pick. Make sure the first commit says “pick” and change the rest from “pick” to “squash”.
  4. Save and close the editor. It will give you the opportunity to change the commit message.
  5. Save and close the editor again. Then you have to force push the final, squashed commit: git push --force-with-lease origin.
Table of Contents

Back to the top