how to squash/combine commits?

I forked a project to make changes to multiple source files. I did all my editing using the web page interface. As I made changes to the code, I’d “commit” (save?) the work and come back to it later. 

When it was all ready I did a pull request, and got a request back saying I should combine all my commits into one.

How do I select all the changes I made to source file xyz.cpp so it looks like just one set of changes, instead of “showing my work”?

Secondly, what did I do wrong in the first place? When I saved my changes each time, I wasn’t expecting that to be all kept separate, and show up as dozens of small changes in the pull request.

If I have to use git on a linux system, how do I get my changes there and how does git know what to connect to? 

Thanks for anay help you can provide.



Hello Don,

You could install Git on Linux.

Then clone the repository:

git clone

Creates a new branch:

git checkout -b dr.changes-to-vmur

Take your Pull Request to local branch:

git am -3

Then start to rebase as the maintainer suggested here:

git rebase -i HEAD~43

Once you finished rebase, let Git know your forked repository:

git remote add donald-russel

Then you could either:

  1. Force pushed to donald-russel/master so that got updated

  2. (Recommend) Push the branch to your repository, then create a new Pull Request.

    git push donald-russel dr.changes-to-vmur

Hope this helps,