Thursday, January 10, 2013

Git Creating a new Repository from an existing repository


Create a new Git Repository from exising repository.


cp -r ExistingRepo NewRepo
cd newRepo
git remote rm origin
git remote add origin https://github.com/BroadleafCommerce/NewRepo.git
git remote add upstream-existingRepo https://github.com/BroadleafCommerce/ExistingRepo.git
#make sure that you cant push back into upstream.
git remote set-url --push upstream-existingRepo no-pushing


1 comment: