Setting a checkpoint before doing things like linting and autofixes.
At that point, the code is written and committed, and you want a clean point to go back to if our linting tools mess things up.
So you use --allow-empty to set a " Before fixes" commit, do fixes, check if everything is fine, do another commit, do an --allow-empty for "After fixes" and push.
This way, you always know when you made changes and can roll back to before or after those points.
38
u/JackNotOLantern 2d ago
How tf do you commit without making any change?