I'm currently working with Puppet modules, and I'm "forking" them from their public repos to an internal Git server. Currently, my workflow is:
git remote rename origin upstream
git remote add origin ssh://server.name/repo/path.git
git push -u origin master
Is this the appropriate way to re-host a public repo on an internal server?
Additionally, is there anyway to share the configuration for the upstream repo automatically with anyone who clones the internal repo? Or does each user need to manually run git remote add upstream <server>
?
Is this the appropriate way to re-host a public repo on an internal server?
Yes. The --origin
option to git clone
will let you remove step 2 from your workflow.
Additionally, is there anyway to share the configuration for the upstream repo automatically with anyone who clones the internal repo?
There is not. You could put together a script that would implement your desired configuration and share that with developers who will be working on the project with you.