I've been using git subtree split
to divide up one huge repository, imported to Git from another VCS, into smaller repositories.
$ git subtree split -P ./path/to/folder/ -b folder-only
This has been working and I've moved a couple of folders out into new repositories but attempts on their siblings, after running through all the available commits, have no branch created.
The final message is
"No new revisions were found"
I don't know if this is important or not but running with --debug
gives messages like the following
Processing commit: ca9d25944cf34bbe7aa356248a166ac1fb813f2a
parents: fc0e5a621ab871b8a11071eec321f4b40b8dcce0
newparents:
tree is:
Why has git subtree split
failed and what can I do about it?
I had the same symptoms when my --prefix
was pointing to a directory that was not known to git. In my case I had a too aggressive .gitignore
configuration.
So, to clarify my suggestions.
Make sure your:
--prefix
folder is known to git. If needed add
and commit
it first.
.gitignore
file doesn't rule out your desired directory.
I hope this helps, or at least gives you a hint in the right direction.
At least on my Windows 10 environment, the directory you specify with the -P (--prefix) parameter in git subtree split
is case sensitive. I was having the same problem as the OP until I tried the same command making sure to get the directory casing correct.
So if you're trying to split the Utility
folder from c:\repo\Utility
, you have to do git subtree split -P Utility ...
, not git subtree split -P utility ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With