-
can you do a formatting fix for all commits?
```sh
git rebase origin/master -x "npm run format"
```
this will stop at each commit, run the command, and then:
-
a) if all good - will continue to next commit.
-
b) if not all good - you'll get some new changes, so you'll need to
```sh
git add . && git commit --amend --no-edit && git rebase --continue
```
-
c) if you encounter merge conflicts, it'll be because of re-formatting - you should always be able to ignore the "incoming change" because it's just formatting -- you take the existing change in all places, and then run the formatting command yourself (`npm run format`, and if changes -- same as in B option), because the command didn't run because of merge conflicts.
-
see also:
-
-
cc [[git-refactor]]
-
-
{{[[TODO]]}} maybe there's some way to use the merge strategy / merge strategy param (`ours`) to automate most of the C part?
-