Are you on Bitbucket Server, Bitbucket Data Center, or Bitbucket Cloud (aka bitbucket.org)?
If you merge using the "Squash" strategy (<Repository> --> Settings --> Pull Requests --> Merge Strategies) then all intermediate commits on the branch being merged will be removed, but all the work is preserved as a new single commit.
Note: The settings page to configure this on Bitbucket Cloud might be at a slightly different location.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.