2 ms·
> Before you merge a feature branch, you can squeeze all its commits into one. That leads to a pretty history too. With Github, you'll end up with a history li
by u801e 8y ago
> Before you merge a feature branch, you can squeeze all its commits into one. That leads to a pretty history too.
With Github, you'll end up with a history like:
Implement feature A
Merge #1 Implement feature A
Implement feature B
Merge #2 Implement feature B
...
you basically end up with twice as many commits than you would otherwise. The other problem is that each commit ends up being rather big and the commit message is a combination of all the commits that were squashed, including ones that don't really contain any useful information (e.g., "Addressing comments").
A big commit is harder to revert (without encountering conflicts).
- unfunco 8y agoUse squash and merge instead. It's built right into GitHub, that way your history will look like: Implement feature A Implement feature B
- u801e 8y agoIn either case, you end up with commits that have large diffs and touch many parts of the code base. Most features require multiple commits to implement. As far as I know, Github does not provide a facility to squash into multiple commits.