We use Git on Bitbucket in my current role, and I didn’t realise how much I liked using GitHub until I started using Bitbucket on a regular basis to commit and test code changes.
The biggest difference is how these systems handle squashed commits into a master branch.
With Bitbucket you can do the usual approach of multiple commits on a branch/pull request:
When you go to merge this to master, you can choose squash commits:
which a nice way to make a cleaner commit history on the master branch:
However if you look at the branch/PR now that it is merged you will notice you’ve lost all commit history! 😿
This has been super frustrating for helping us diagnose what went wrong during the development of a change where an issue was introduced.
Comparing this same workflow to GitHub, you can see that you can see individual commits against a branch, and squash these into master:
After merging you can still see the full commit history on the PR and branch:
and it is squashed on the master commit history:
Has anyone else noticed this with Bitbucket? Any known workarounds to keep commit history on branches/PRs?