Git apply a patch to the working directory

后端 未结 3 790
情深已故
情深已故 2021-02-04 00:36

I have a patch that contains a lot of changes that I would like to split into multiple commits and potentially modify some of the changes.

I want to apply this patch to

3条回答
  •  忘了有多久
    2021-02-04 01:23

    You can use git apply which applies a patch:

    git apply < patchname.patch
    

    This does not create any commits. In fact, without any options the git apply command doesn't even need to have a Git repository. It just applies patches to files.

提交回复
热议问题