Workflow for big code reformats or reorderings

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the git category.

Last Updated: 2021-05-15

I was working on a random feature and saw opportunities to clean up the CSS files with a beautifier. I did so, in the same feature branch. But this feature branch was not ready to merge for a week. This meant the development branch others were working on went far out of sync, and the merge conflicts became nasty and many people were hit by hard-to-handle surprises.


In future, any work relating to code formatting should be done in a separate branch. It should be done quickly (ideally overnight), and with communication with other team members (i.e. asking them to commit what they have to development first and me basing my work off this committed code).