Github - Merging of PRs - Squash or not to squash ... or who squashes when?

First of all thanks @pkriens for merging my recent contributions.

On that note: I noticed (and was a bit surprised) that each of my commits have been merged to master.
I expected that only a single merge commit with all the intermediate commits being squashed.
I know this is a debatable topic.

I am used to a workflow where I make tons of intermediate commits in my branch. When we merge to Master / Main we squash all commits into a single merge commit (and give it a nice summary message). The person merging to master does that. The local branches still have all the commits with all the detailed history in case you want to look that up.

I just wanted to know how you handle that.

To be honest … personally I really do not care even the slightest. BJ Hargrave managed the git and since it worked, I am happy. I know we had some different strategies over time.

In the rare occasion I need to go through the history, well, too bad. Or too good if the details are in the detailed commits. Looking in the log happens so rarely that I do not feel any need to optimize it in any way.

If you feel strong about any of this and are willing to work for it, feel free to raise this in the slack channel and see if you can get a discussion started.

1 Like

No I am fine, just wanted to know what is preferred. Since now I know that all commits go into master, I will be a bit more thoughtful with some small bugfix commits (aka “Dough”… “Fix typo”) or squash them locally. But since I tend to write prose in my commit messages, it could be useful at times :slight_smile:

Thanks.

I would not worry too much about your commit texts. As said, the commit log is rarely ever used. It is not in any way a deliverable. You will find lots of bad comments from me in the log when I got frustrated :slight_smile: