Sub-directory into independent repository and later merge back into main repository

你离开我真会死。 提交于 2019-12-06 00:40:31

One way to solve this issue (which may fill particular usecase) is described in this post: https://lostechies.com/johnteague/2014/04/04/using-git-subtrees-to-split-a-repository/

Basically you remove project_a/directory_a from master (& commit) and then subtree add --prefix from (remote) branch like this:

git subtree add --prefix=project_a/directory_a remote branch

But this is not 100%, since there is better way to solve this.

One-liner which solves this:

 git merge -s subtree directory_a_branch master
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!