Hjertnes

Git commits in multiple phases

2024-08-21 00:00

The way I use git with feature branches, rebasing, interactive rebase etc I’ve found it incredible useful to do my commits in multiple phases.

When I work on something I commit all the time, usually with messages that’s only useful to me.

Then when I’m ready to send it to review I will re do them, either as in squashing or something as in resetting all of them and re-doing them. Typically having separate commits for lining, fixing kind of related issues, making the project ready for the change I’m doing, the actual change, kind of related fixes after implementing it, unrelated fixes etc.

Useful both for keeping track of what I’m doing while working, and then making sure the git history makes sense for other people after.

Made with ❤️ in Bergen, Norway by Eivind Hjertnes