how to merge specific files in git

前端 未结 4 801
傲寒
傲寒 2021-01-04 09:48

Suppose I have a project on MASTER branch with 100s of php files. To do a bug fixing in the project, i create a separate branch

git checkout -b bugfix
         


        
4条回答
  •  醉话见心
    2021-01-04 10:27

    There is no way to record a partial merge in Git, all merges must merge the entire root trees of all the commits being merged.

    You can of course choose to resolve that merge by choosing the unchanged copy of one the files from one of the parents, but this is still a "full" merge and the changes in that file will be considered to have been merged when it comes to subsequent rebases or merges between the branches involved.

提交回复
热议问题