I need to take out few folders from existing big repo and create a new small repo. I then plan to use the small repo as a folder inside big repo using subtree. I think these two steps should work together. I am on Windows 10/ git 2.28.
For step 1 of splitting repo, I want to use git-filter-repo following @Ipearson answer of this SO question
But all my folders are getting deleted after running following command:
git filter-repo --path dir1\dir2 --force
I have to use force option otherwise it keeps saying that it is not a fresh clone. But I have cloned the repo in new directory!
Here is the output for filter-repo command:
I was expecting that dir2 inside dir1 will continue to exist. I actually have to use multiple --path directories like following but that is also not working as expected.
git filter-repo --path dir0 --path dir1/dir2
So my questions are:
- why do I need to use --force
- why all the folders are removed after running filter-repo
Thanks