Git: How do I clone a subdirectory only of a Git repository?

前端 未结 18 2899
时光说笑
时光说笑 2020-11-21 04:33

I have my Git repository which, at the root, has two sub directories:

/finisht
/static

When this was in SVN, /finisht was chec

18条回答
  •  灰色年华
    2020-11-21 05:03

    If you never plan to interact with the repository from which you cloned, you can do a full git clone and rewrite your repository using git filter-branch --subdirectory-filter. This way, at least the history will be preserved.

提交回复
热议问题