Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

How do I clone a specific Git branch?

# syntax
git clone -b <branch> <remote_repo>

# Example
git clone -b my-branch git@github.com:user/myproject.git

# With Git 1.7.10 and later, add --single-branch to prevent fetching of all branches. 
# Example, with OpenCV 2.4 branch:
git clone -b opencv-2.4 --single-branch https://github.com/Itseez/opencv.git
Comment

clone a given branch github

git clone --single-branch --branch <branch> <repository>
Comment

how do i clone a specific branch in git

git clone -b <your_branchname> <your_git-remote-repo>
Comment

clone a specific branch

clone a specific branch... 
$ git clone -b <branchName> <clone with HTTPs link>
Comment

specific branch clone git

git clone -b <branch> <remote_repo>
git clone -b my-branch git@github.com:user/myproject.git
Comment

clone specific branch git

clone specefic branch in git
git clone --single-branch --branch <branchname> <remote-repo>
Comment

clone specific branch git

clone specefic branch in git
git clone --single-branch --branch <branchname> <remote-repo>
Comment

clone branch git

git clone <repository_url>
git branch -a
git checkout <branch_name>
Comment

clone specific branch from github repo

git clone -b <branch name> --single-branch https://github.com/<user name>/<repo>.git
Comment

how to git clone a branch github

git clone -b opencv-2.4 --single-branch https://github.com/Itseez/opencv.git
Comment

how to git clone a specific branch

# Using gh CLI

gh repo clone <username>/<reponame> -- -b <branchname>
Comment

PREVIOUS NEXT
Code Example
Shell :: zsh in Mac OS 
Shell :: matlab activation client 
Shell :: extract tar.gz linux command line 
Shell :: how uninstall composer 
Shell :: bash how to print the list of files in a directory 
Shell :: The current application is not compatible with NativeScript CLI 8.0.2 
Shell :: commit to wrong branch git | move wrong commit to the correct branch 
Shell :: docker prune dangling none 
Shell :: pm2 logs 
Shell :: bash: ./runapp.sh: Permission denied 
Shell :: windows open port firewall cmd 
Shell :: internet not working on centos 8 on linux 
Shell :: copy only directory contents to another directory 
Shell :: how to find the which linux am i using through terminal 
Shell :: budo is not recognized as an internal or external command 
Shell :: download specific folder from git 
Shell :: vue 3 qr code reader 
Shell :: zypper install build-essential 
Shell :: what does the export command do in linux 
Shell :: docker container network troubleshoot 
Shell :: install influxdb 
Shell :: bash array append 
Shell :: powershell create folder recursively 
Shell :: ubuntu vs lubuntu 
Shell :: install arch linux 
Shell :: command to select a word in vim 
Shell :: batch rename folder 
Shell :: link to folder ubuntu 
Shell :: less command show line numbers 
Shell :: Save changes in a new branch git 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =