OT: Squashing Git commits AFTER pushing them

BACK STORY: I’m working on the rubygems.org site. So far, all I’ve done
fill in the missing details on setting up the project. (The only two
I’ve changed are config/database.yml.example and CONTRIBUTING.md.) I
forked the project, made changes, pushed them, and submitted a pull
request. You can see the pull request at
Updated config/database.yml.example and CONTRIBUTING.md by jhsu802701 · Pull Request #690 · rubygems/rubygems.org · GitHub .

I was told that I need to combine my multiple commits into one. So I
the “git rebase” command, but there’s one more step that I’m missing.
told that I merged in the master branch but didn’t rebase/squash the

When I enter “git log”, the output starts with:

*commit 9f341298389e64c2fec62a6400c0529d014a42b2
Merge: 738e1b7 4d366e4
Author: Jason H.
Date: Mon May 26 14:30:47 2014 -0500

Merge branch 'master' of https://github.com/jhsu802701/rubygems.org

Provided username and password in config/database.yml.example; added 

setup details in CONTRIBUTING.md

commit 738e1b7cdb72e4e6fe142e181e9a148d1d57f10a
Author: Jason H.
Date: Fri May 23 12:31:30 2014 -0500

Updated setup to include how to install old version of gems, how to 

redis-server in Linux, and how to install PostgreSQL in Linux

Added complete initrd and pg_ctl commands for getting started

Changed formatting of commands to prepare Postgres

Removed indents for Postgresql setup*What else do I need to do to 

combine all of the commits I made into just one?

Check the number of commits in your PR and do the following:

$ git reset --soft HEAD~<number_of_commits_in_pr>
$ git commit -m “”
$ git push --force origin <your_branch>

Your commits should be updated on the pull request also.

Hope this helps.

2014-05-28 14:51 GMT-07:00 Jason H., Rubyist [email protected]:

Thanks. This worked. Next time, I’m creating and switching to another