Answers for "git clone --mirror"

9

git clone repo with name

git clone https://github.com/foo/repo_name.git new_directory_name
Posted by: Guest on April-07-2020
2

clone branch git

git clone <repository_url>
git branch -a
git checkout <branch_name>
Posted by: Guest on January-05-2021
0

git mirror repository

cd myrepo
git fetch origin
git push --mirror <remote_repo_git_url>
Posted by: Guest on October-13-2020
0

clone from one repo to another

First clone the repository you want to work with. This step could be skipped if you want it all to happen in the folder you are already in.

git clone file:///path/to/repo/
Cloning will bring over the remotes specified in that directory. So you'll need to remove the remotes you don't want.

git remote rm <remote>
And add the ones you do, after you have created your remote repository.

git remote add origin <url>
Posted by: Guest on May-24-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language