Hack your way to a good Git history
masalmon.eu·2d·
Discuss: Hacker News
🌳Git Internals
Preview
Report Post

** 2024/06/11

I’ve now explained on this blog why it’s important to have small, informative Git commits1 and how I’ve realized that polishing history can happen in a second phase of work in a branch. However, I’ve more or less glossed over how to craft the history in a branch once you’re done with the work.

I’ve entitled this post “Hack your way to a good Git history” because writing the history after the fact can feel like cheating, but it’s not!

To branch or not to branch

With the second method of re-writing history I’ll present, you could get away with working on the default branch as long as you do not push. However, I’d really recommend creating a branch …

Similar Posts

Loading similar posts...