git - Copy commits in repository A to repository B, deleting all files in B but retaining history? -


i have 2 repositories:

  • repository contains complete, finished application.
  • repository b contains proof-of-concept prototype application developed prior complete application.

i want delete prototype out of repo b (but retain history) , apply commits on b. how can approach this?

you can merge branches want merge repo after removing of data master branch of repo b , committing removal.

in repo b:

git rm -r . git commit -m "cleaning out prototype." git remote add repoa /path/to/repo/a git merge repoa/master 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -