Open rogerxu opened 7 years ago
git clone /c/git/folder1/ /d/git/folder2 --progress
git clone from another directory - Stack Overflow
Full copy one repository to another (including commit’s history and branches).
git clone --mirror {{url://to/old_repo}}
cd {{old_repo}}
git remote add new-origin {{url://to/new_repo}}
git push new-origin --mirror
--mirror
- Set up a mirror of the source repository. This implies --bare
. Compared to --bare
, --mirror
not only maps local branches of the source to local branches of the target, it maps all refs (including remote-tracking branches, notes etc.) and sets up a refspec configuration such that all these refs are overwritten by a git remote update in the target repository.Cloning only special directory from an old repository to new one with saving history of all changes.
mkdir {{/path/to/new_repo}}
git init --bare
cd {{/path/to/old_repo}}
git subtree split --prefix={{directory_name}} -b split
git push {{/path/to/new_repo}} split:master
cd {{/path/to/new_repo}}
git remote add origin {{url://to/new_repo}}
git push origin master
git clone //computer1/git/folder1/ folder2 --progress
GIT clone repo across local file system in windows - Stack Overflow
How to clone the repo from
folder1
tofolder2
?