美文网首页Git
Git squash part 02

Git squash part 02

作者: JaedenKil | 来源:发表于2020-09-17 13:56 被阅读0次

    We can use command git rebase -i to squash commits.
    However, there is another way:

    • Remove all unwanted commits, but keep the changes
    git reset --soft ${commitId}
    
    • Make new commits
    git add -u
    git commit --amend "xxx"
    

    OR

    git add -u
    git commit --amend -m "XXX"
    

    相关文章

      网友评论

        本文标题:Git squash part 02

        本文链接:https://www.haomeiwen.com/subject/wsefyktx.html