Create a git patch from the uncommitted changes in the current working directory

后端 未结 7 1516
小蘑菇
小蘑菇 2020-11-27 08:53

Say I have uncommitted changes in my working directory. How can I make a patch from those without having to create a commit?

7条回答
  •  攒了一身酷
    2020-11-27 09:16

    git diff for unstaged changes.

    git diff --cached for staged changes.

    git diff HEAD for both staged and unstaged changes.

提交回复
热议问题