Create new git repo from already existing repo's subdirectory

前端 未结 4 590
我在风中等你
我在风中等你 2021-01-02 03:38

I want to create a separate repo from an already existing repo\'s subfolder.

Detach (move) subdirectory into separate Git repository shows exactly that. BUT, I can\'

4条回答
  •  醉梦人生
    2021-01-02 03:55

    Github has a straight forward method:

    https://help.github.com/articles/splitting-a-subpath-out-into-a-new-repository

    git clone git://github.com/defunkt/github-gem.git

    cd github-gem/ Change directory into the repository

    git filter-branch --prune-empty --subdirectory-filter lib master

提交回复
热议问题