At my company we ask developers to squash commits on feature
branches before merging into develop
. Once squashed, the developer pushes to GitHub and logs into GitHub to create a pull request.
When the pull request is merged, we end up seeing two commits in the history of the develop
branch:
- A commit saying "merged pull request"
- The single, squashed commit from the
feature
branch
Why does this happen? And how can we avoid it? I've read a similar Q&A about avoiding "merge commit hell" but my goal is to use the GitHub UI to create, track, and discuss pull requests.