Show both staged & working tree in git diff?

后端 未结 3 730
遇见更好的自我
遇见更好的自我 2020-12-05 06:44

If I run git diff I see the changes in my working tree, and if I run git diff --staged (alternatively --cached) then I see the changes

3条回答
  •  感动是毒
    2020-12-05 07:03

    The diffuse visual diff tool can do that: It will show three panes if some but not all changes are staged. In the case of conflicts, there will even be four panes.

    Screenshot of diffuse with staged and unstaged edits

    Invoke it with

    diffuse -m
    

    in your Git working copy.

    If you ask me, the best visual differ I've seen for a decade.

提交回复
热议问题