What's the difference between “squash” and “fixup” in Git/Git Extension?

前端 未结 6 1932
夕颜
夕颜 2020-12-07 15:14

I\'ve been using Git Extensions for a while now (it\'s awesome!) but I haven\'t found a simple answer to the following:

Sometimes, when typing a com

6条回答
  •  不思量自难忘°
    2020-12-07 16:00

    I tinkered with git extensions and couldn't get it to squash many commits into one. To do that, I had to resort to the command line and found this post helpful

    git rebase -i Head~2
    

    This is interactive rebase, and note the following:

    • ~2 here refers to how many commits you want to involve in this operation, including the current head
    • You have to edit the subsquent interactive edit window, leave the first item as "pick" and replace subsequent lines with "squash". The instructions in the link above are much clearer if this is opaque.

提交回复
热议问题