3 ms·
There's a few reasons why this is a lossy workflow compared to commits with proper messages that are later merged, not squashed into one. 1. The PR itself beco
by js2 5y ago
There's a few reasons why this is a lossy workflow compared to commits with proper messages that are later merged, not squashed into one.
1. The PR itself becomes a single giant commit. To adequately explain the diff in a single message would require writing an essay instead of a few paragraphs. It is also now hard to tell which part of the PR message is associated with which part of the massive diff.
2. If something breaks, you can't dissect into which part of the diff caused the problem.
3. It's harder to document your work as you go. I may be working on a PR for days or weeks. Commits give me an opportunity to document each part of my change _at the time I make the change_. It's a chance for me to record how and why at the time it's fresh in my head. If I wait to do this until the PR is ready, I likely will have forgotten some bit of context I wanted to record about the commit.
4. It encourages sloppy commits, making a large PR harder to review. Ideally, I should be able to review a large PR by looking through each commit.
If your reply to all this is to say you should just submit smaller and more frequent PRs, fine, but then why ever have PRs that consist of more than one commit?