Git Checkout Specific Branch From Remote Repository
Table of Contents
This article explained, checkout specific branch from git remote repository. In the real time environment, some times we want to checkout only specific branch instead master branch which by default downloaded. After checkout the specific branch, we can verify the branch downloaded or not.
We can use the following command to clone the specific branch from git remote repository.
Git Checkout Specific Branch From Remote Repository
Syntax
git clone -b <branch> <remote_repository>
Example
git clone -b develop https://github.com/narayanatutorial/DecodeIdToken.git
Verify the Branch
After downloading the above branch, we can verify by executing the following command.
$ git branch * develop
References
https://devconnected.com/how-to-clone-a-git-repository/
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in the IT industry for more than 12 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting, Website Development, and IAM(ForgeRock) Specialist
I am a self-learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.