How do I merge a sub directory in Git?

前端 未结 6 886
太阳男子
太阳男子 2020-11-27 11:08

Is it possible to merge only the changes for a sub-directory from a local Git branch to a remote Git branch or is it "all or nothing"?

For example, I have:<

6条回答
  •  温柔的废话
    2020-11-27 11:44

    I got this from a forum thread at Eclipse and it worked like a charm:

    git checkout source-branch
    git checkout target-branch  
    git commit
    git checkout target-branch
    git merge source-branch
    

提交回复
热议问题