Skip to content

Instantly share code, notes, and snippets.

@hevele-moda
Last active October 11, 2019 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hevele-moda/5c8acf66718a8ccce79e150130cbf065 to your computer and use it in GitHub Desktop.
Save hevele-moda/5c8acf66718a8ccce79e150130cbf065 to your computer and use it in GitHub Desktop.
rebase with prettier conflicts
# 1. First pull latest master and yarn install
git checkout master
git pull origin master
yarn install
# 2. Check out your branch and rebase it on the commit before prettier
git checkout <YOUR_BRANCH>
git rebase --onto e96854efabfc690c9b5665129a9c7d54dcb8e282 master
# Fix any conflicts (these will NOT be related to prettier formatting)
# 3. Rebase on the prettify commit and prettify the conflicting files
git rebase --onto 7d76d719bdde24402dd2f47ee0974ae632bd87c3 master
# FOR all conflicts:
git checkout --theirs <CONFLICTING_FILES>
yarn prettier --write <CONFLICTING_FILES>
git add .
git rebase --continue
# 4. Rebase on latest master
git rebase master
# Fix any conflicts (these will NOT be related to prettier formatting)
# 5. force push your branch
git push origin +<YOUR_BRANCH>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment