Last active
October 11, 2019 12:44
-
-
Save hevele-moda/5c8acf66718a8ccce79e150130cbf065 to your computer and use it in GitHub Desktop.
rebase with prettier conflicts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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