Git splitting subtree "No new changes found"

I used git subtree split to split one huge repository, imported into Git from another VCS, into smaller repositories.

 $ git subtree split -P ./path/to/folder/ -b folder-only 

This works, and I moved a couple of folders to the new repositories, but the attempts of their siblings after executing all available commits have no branch created .

Last message

"No new changes were found."

I do not know if this is important or not, but it works with --debug , it displays the following messages

Commit Processing: ca9d25944cf34bbe7aa356248a166ac1fb813f2a
parents: fc0e5a621ab871b8a11071eec321f4b40b8dcce0
newparents:
wood:

Why git subtree split fail and what can I do with it?

+6
source share
2 answers

At least in my Windows 10 environment, the pointer you specified with the -P (--prefix) option in git subtree split case sensitive . I had the same problem as the OP, until I tried to execute the same command, making sure that the directory body is correct.

So, if you are trying to split the Utility folder with c:\repo\Utility , you need to do git subtree split -P Utility ... and not git subtree split -P Utility ...

+4
source

I had the same symptoms when my --prefix 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 that:

  • --prefix folder is known as git. If necessary, add and commit first.

  • .gitignore file does not exclude your desired directory.

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

+3
source

All Articles