how to apply multiple git patches in one shot

前端 未结 2 577
忘掉有多难
忘掉有多难 2020-12-10 01:00

I am having around 100 patches like below,is there a way to apply all of them in one shot?

0001-*.patch,0002-*.patch,0003-*.patch............
相关标签:
2条回答
  • 2020-12-10 01:34

    You can use git am, for example

    $ git am *.patch
    

    For all available options, checkout the man page.

    0 讨论(0)
  • 2020-12-10 01:35

    To get one commit for all patches:

    git apply *.patch
    git add -A
    git commit -m '<your message>'
    

    Patches are applied in the order of the directory listing.

    git apply has most of the flags of git am

    0 讨论(0)
提交回复
热议问题