Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Empowering you to understand your world

How To Clone All Remote Branches With Git

You can clone all of the remote branches of a GitHub repository using the ‘clone’ command as shown below. However, to view branches outside of the master branch you need to run some additional commands.

git clone https:/github.com/.../name.git

The clone command above will download all branches in the repository. However, the ‘git branch’ command may only show the master branch. Why? This is because local branches aren’t created for the others. You can still access them offline by typing ‘git branch -a’. You should now see all branches listed. You can switch to one of them using ‘git checkout [branchname]‘.

If you want to create local branches for each of them so you can group them with ‘master’ and see them even without the ‘git branch -a’ command, use ‘checkout -b’ as shown below.

git checkout -b branchname

Further Reading

How To Delete A Local Branch In Git

Subscribe to our newsletter
Get notified when new content is published