I have my local development repo on Windows at C:\Dev\myrepo
, that was cloned from the remote repo is at git@githost.com:myrepo.git
. I’m getting ready to deploy it and I'd like to clone the repo in a different location, C:\Publish\myrepo
so that it's completely clean.
What I'd like to do is:
- Clone the remote repo but leverage the existing local repo so that the entire repo doesn't have to be downloaded needlessly.
- After the clone is complete, I don’t want there to be any connection between the two local repos.
I've read a few things about --reference and --bare and --share, and it is hard to be certain whether things are going to really do what I expect them to do.
Will the following command do what I want?
cd /c/Publish
git clone --reference /c/Dev/myrepo git@githost.com:myrepo.git