0

I made the mistake of making too many small commits after committing big changes and then realizing I missed something minor when comparing changes to master in a pull request.

How could I go about removing the previous commits I've made on my branch, and then make just one comprehensive commit with all of the changes I've made? I don't want to revert the code on my local machine to a previous commit.

  • 3
    Key search phrase: **squashing**. – Oliver Charlesworth Jun 16 '17 at 16:46
  • The good news is that if you made a bunch of small commits and haven't pushed yet, ye shall have salvation from embarrassment. Pretty much just look up squashing like Oliver suggested. –  Jun 16 '17 at 16:49
  • Thanks for pointing out that this is a duplicate. If I do: `$ git rebase -i ` will this squash only commits in my branch? I don't want to squash any commits in master. – Kaisermania Jun 16 '17 at 16:55

0 Answers0