How to clone a specific Git branch

0 votes

Hi Guys,

I have two branches in my Github account. I want to clone a specifit branch. How to do that?

Dec 22, 2020 in Git & GitHub by akhtar
• 38,170 points
174 views

1 answer to this question.

0 votes

Hi@akhtar,

You need to specify the branch name in your git clone command with the -b or --branch tag as shown below.

$ git clone --branch <branchname> url
answered Dec 22, 2020 by MD
• 95,160 points

Related Questions In Git & GitHub

0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,890 points
904 views
0 votes
1 answer

How to move the most recent commits to a new branch with Git?

Hi@akhtar, If you want to move your commits ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,160 points
64 views
+1 vote
1 answer

How to create a remote Git branch?

Hi@akhtar, The easiest way is to create one ...READ MORE

answered Dec 22, 2020 in Git & GitHub by MD
• 95,160 points
55 views
0 votes
1 answer

How to get changes from master branch to a new branch in Git?

Hi@akhtar, You need to check out the branch and ...READ MORE

answered Jan 4 in Git & GitHub by MD
• 95,160 points
83 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,064 views
0 votes
1 answer

How to checkout Hadoop 2.6.0 from git

Clone the following Git repository: git clone git ...READ MORE

answered Apr 23, 2018 in Big Data Hadoop by kurt_cobain
• 9,390 points
278 views
0 votes
1 answer

How to delete a Git branch remotely?

Hi@akhtar, You can delete the branch locally or ...READ MORE

answered Nov 21, 2020 in Git & GitHub by MD
• 95,160 points
86 views
+1 vote
1 answer

How to check out a remote Git branch?

Hi@akhtar, You can use the git checkout command ...READ MORE

answered Nov 21, 2020 in Git & GitHub by MD
• 95,160 points
63 views