Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git subtree split "No new revisions were found"

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?

like image 553
Boggin Avatar asked Nov 20 '15 16:11

Boggin


2 Answers

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:

  1. --prefix folder is known to git. If needed add and commit it first.

  2. .gitignore file doesn't rule out your desired directory.

I hope this helps, or at least gives you a hint in the right direction.

like image 181
dbm Avatar answered Oct 20 '22 08:10

dbm


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 ...

like image 8
Alex Dresko Avatar answered Oct 20 '22 09:10

Alex Dresko