Ensure your workspace is clean, with no unstaged / uncommitted changes.
Pull the latest master branch (git checkout master; git pull)
Checkout your branch (git checkout my_branch)
Rebase until just before the reformat commit and fix any conflicts manually:
git rebase 6b57dbd2eaca95a7ab7d095be73e54041529b9e5^
Download Google Java Format manually with wget https://repo1.maven.org/maven2/com/google/googlejavaformat/google-java-format/1.7/google-java-format-1.7-all-deps.jar -P ~
Reformat any changed Java files on your branch by running the following command:
git diff --name-only 6b57dbd2eaca95a7ab7d095be73e54041529b9e5^ | xargs java -jar ~/google-java-format-1.7-all-deps.jar --replace
Commit your reformat changes:
git commit -am “formatting”
Rebase over the reformat commit on master, always taking the changes from your branch:
git rebase -X theirs 6b57dbd2eaca95a7ab7d095be73e54041529b9e5
There is no need to manually resolve conflicts for this command since we know the commit on master is just the reformatting.
Finally, rebase over the latest master and manually fix conflicts: git rebase master