Approval error while trying to perform git subtree splitting

I have a private GitHub repo (which I cannot here) clone locally. I want to split a subfolder in this repo into a new subtree repository. I follow these instructions Using Git subtrees to split the repository (under Splitting the code into your own repository ).

My special team:

> git subtree split -P .\plugins\rg-feed-client -b rg-feed-client 

however, it fails with the exact error message with the error "assertion failed", which looks like this:

 1/ 26 (0)2/ 26 (1)assertion failed: [ plugins/rg-feed-client = .\plugins\rg-fee 3/ 26 (2)assertion failed: [ plugins/rg-feed-client = .\plugins\rg-feed-client ] ... 26/ 26 (25)assertion failed: [ plugins/rg-feed-client = .\plugins\rg-feed-client ] 

If I try any other subfolder, the exact same thing will happen. I don’t know what could be wrong here ... HELP!

My repo has 2 remotes: origin and remote access for the existing subtree, which I added to my repo.

+5
source share
2 answers

This is probably due to backslashes in --prefix (then I was running Windows.)

ps no one was able to answer this, but they felt free to vote for my question? Of course I did a study, some people here are just pr1cks

+7
source

Split -P cannot gracefully handle the directory path. Use the following command instead:

 git subtree split --prefix=plugins/rg-feed-client -b rg-feed-client 

A few points to remember -

  • Avoid the ./ prefix with the ie path instead of ./plugins/rg-feed-client use plugins/rg-feed-client

  • Avoid any trailing / following paths i.e. NO plugins/rg-feed-client/

0
source

Source: https://habr.com/ru/post/1201372/


All Articles