Annie Sexton describes a better git flow in her article on the render.com blog. The idea is that a better git flow would bundle commits to specific features. A seperation of concerns for your commits will allow you to revert changes without breaking other unrelated features.
- Do work and make WIP commits; Don't worry about your commit messages
- When you are finished run
git reset origin/main
- Organize your changes into clean and logical commits with meaningful commit messages
- Create Pull Request / Review PR / commit to main
Link to the original article by Annie Sexton.