Split directories in git to new repository -


i dont know if approach correct result want. me figure out?

i have repository abbr repo 3 solutions split up.

before:

root |_project1 |_project2 |_project3 

after:

root |_project1 

etc etc.

my approach:

git clone <url-to-old-repo> <new-repo-folder> cd <new-repo-folder> git checkout <branch> git remote rm origin git filter-branch \    --prune-empty \    --index-filter '       git rm --cached -qr --ignore-unmatch -- . && git reset -q $git_commit -- \       <project-folder>    ' \    -- \    --all git remote add origin <url-to-new-repo> git push -u origin <branch> 

after these commands, end new repo folder want , history preserved. , done 3 projects. remaining repo contains project unused in future, maybe kept backup.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -