Show diff when writing commit messages during an interactive rebase

前端 未结 3 1152
礼貌的吻别
礼貌的吻别 2021-02-19 21:54

When doing a regular git commit, git commit --verbose shows the diff in the text editor when writing the commit message.

Suppose I am doing an interactive r

3条回答
  •  逝去的感伤
    2021-02-19 22:28

    In the middle of a rebase,

    git diff
    

    shows you the changes not yet added to the commit,

    git diff --cached 
    

    shows you the new changes you committed, and

    git show
    

    shows you the original changes in the commit you're editting.

提交回复
热议问题