Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 3
    As far as I am aware, this will not work for merge commits. Commented Apr 26, 2017 at 9:50
  • 4
    Although it's not commented by any others, this even works for commits which are not at the HEAD. For instance, my need was to squash some WIP commits I did with a more sane description before pushing. Worked beautifully. Of course, I still hope I can learn how to do it by commands. Commented Apr 27, 2018 at 22:03
  • 1
    This is superb! Everything will be done by just couple of mouse clicks and I could merge 200 commits of old repo before archiving! Thanks. Really useful to make branch tree clean and easily review code changes at once.
    – sanpat
    Commented Mar 18, 2021 at 19:39
  • You can similarly select n commits and squash them via GUI of GitHub Desktop desktop.github.com
    – Jirik
    Commented Nov 8, 2022 at 17:20
  • WebStorm also has a "Squash commits" option if you select 2+ commits and right click. Commented Jun 18 at 21:22