0

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

My directory structure is: directory structure

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! error if force is not used

Here is the output for filter-repo command:

filter-repo ran for 4 seconds

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:

  1. why do I need to use --force
  2. why all the folders are removed after running filter-repo

Thanks

vb.s
  • 13
  • 5

0 Answers0