Import a git repo into an empty branch
Lets say a project has been developed in one repo, and the project website was developed in another.
Is there a way to import the website repo, with full history, into an empty 开发者_JAVA技巧branch of the project repo?
git remote add rweb git://whereever git fetch rweb
And voilà, you have it in one repository. Perhaps you then also want to create a branch out of it, to make it accessible and pushable:
git branch website rweb/master git push origin website
Starting with an empty branches and dumping the website tree instead would have the drawback of losing all the history.
I guess this would be a case for git submodules
精彩评论