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

前端 未结 6 1945
夕颜
夕颜 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 15:51

    Why not ask git itself? When you rebase with git-bash, it says:

    pick 512b1d7 (some comment)
    # Rebase 621b2e4..512b1d7 onto 621b2e4 (1 command)
    #
    # Commands:
    # p, pick  = use commit
    # r, reword  = use commit, but edit the commit message
    # e, edit  = use commit, but stop for amending
    # s, squash  = use commit, but meld into previous commit
    # f, fixup  = like "squash", but discard this commit's log message
    # x, exec  = run command (the rest of the line) using shell
    # d, drop  = remove commit
    # l, label 

    So you see:

    s, squash = use commit, but meld into previous commit

    f, fixup = like "squash", but discard this commit's log message

提交回复
热议问题