Create patch or diff file from git repository and apply it to another different git repository

前端 未结 4 1575
青春惊慌失措
青春惊慌失措 2020-12-12 09:33

I work on WordPress based project and I want to patch my project at each new release version of WP. For this, I want generate a patch between two commits or tags.

For

4条回答
  •  -上瘾入骨i
    2020-12-12 10:14

    You can just use git diff to produce a unified diff suitable for git apply:

    git diff tag1..tag2 > mypatch.patch
    

    You can then apply the resulting patch with:

    git apply mypatch.patch
    

提交回复
热议问题