How to apply a patch generated with git format-patch?

后端 未结 6 1090
暖寄归人
暖寄归人 2020-11-29 15:10

I have 2 git local repositories both pointing to the same remote repository.

In one git repository, if I do git format-patch 1, how can I apply that patc

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 15:39

    First you should take a note about difference between git am and git apply

    When you are using git am you usually wanna to apply many patches. Thus should use:

    git am *.patch
    

    or just:

    git am
    

    Git will find patches automatically and apply them in order ;-)

    UPD
    Here you can find how to generate such patches

提交回复
热议问题