How to clone all the branches of a remote repository in Git

How to clone all the branches of a remote repository in Git
0

#1

If you are already tracking a remote repository in Git, you can clone all the branches with this simple command: git pull --all

If you aren’t tracking a remote repository yet…

  1. Run the following command in your terminal: git clone git://example.com/exampleproject
  2. Navigate to the project’s directory using cd
  3. Run git pull --all to pull down all the project’s branches

Happy coding!