0

When I type git log, I only get the last 4 commits which came after my last push. I can squash these but the problem is that I have had multiple pushes for this pull request, each with multiple commits. I need to somehow access all of these commits and squash them into one commit. This is on BitBucket but I would prefer the terminal commands.

1 Answers1

0

You could squash all commits of a PR branch, then force push that branch.

But:

You can squash when merging your PR. That avoids having to do any local operation.

That feature is available on:

https://bitbucket.org/blog/files/2017/01/2017-01-26-14-01-41.png

See more at "Why You Should Care About Squash and Merge in Git"

https://cdn-images-1.medium.com/max/1600/1*SodXuOEd1ScO4BcOLrp49g.png

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250