Create a patch including specific files in git

后端 未结 2 1766
隐瞒了意图╮
隐瞒了意图╮ 2020-12-28 13:03

Let\'s say that I am 7 commits ahead of the origin/master repo. I would like to create a patch that includes in the patch specific files that were changed, not all the files

2条回答
  •  天命终不由人
    2020-12-28 13:50

    You can include files in the patches with:

    git format-patch  
    

    Example

    git format-patch HEAD^^^ Makefile
    

    Will give you three files 0001-[commit] ... 0003-[commit] only containing the Makefile.

提交回复
热议问题