You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@apache.org> on 2016/10/27 18:03:37 UTC

Rebasing pre-spotless feature branches on develop

After bungling this once, I took some detailed notes that I've been
following. Here's the steps I'm following to rebase my feature branches on
develop after adding spotless and reformatting code.

Make sure you're on your branch and you have fetched from origin.

1) rebase to the revision that's one prior to the spotless revision:
$ git rebase 56917a26a8916b83f0cec6e85285b5040ff66ee6

2) compile and all other checks should pass:
$ ./gradlew -Dskip.tests=true clean build rat checkMissedTests

3) force push your feature branch:
$ git push --force

4) rebase on the spotless revision and accept your versions for all
conflicted files:
$ git rebase -Xtheirs 8bf39571471642beaaa36c9626a61a90bd3803c2

5) compile and fix any compilation failures:
$ ./gradlew -Dskip.tests=true clean build -x spotlessCheck

(fix any compilation failures)

6) (optional) run spotlessCheck:
$ ./gradlew spotlessCheck

(most files changed on the branch should fail spotlessCheck)

7) use spotless to update files changed on the branch:
$ ./gradlew spotlessApply

8) compile and all other checks should now pass:
$ ./gradlew -Dskip.tests=true clean build rat checkMissedTests spotlessCheck

9) add and commit all files
$ git add -A
$ git commit

10) force push your feature branch:
$ git push --force

If you then need to reword or consolidate commits on your feature branch
use:
$ git rebase -i origin/develop

-Kirk