How to clone GIT repository with all branches and tags

Asked

Viewed 4,228 times

5

In GIT it would be possible to clone a repository and already download all branches and tags There would be a single command for this, without the need to create a shell script?

2 answers

7


When you enter with the command git clone <repositorio>, it automatically downloads the branches along with the tag.

You can check using:

git branch -r


git tag

The remote also comes configured as origin and you can access using:

git remote -v

Now if you go to Github and click Download Zip, it won’t load git with it, then it will return: fatal: Not a git Repository (or any of the Parent Directories): . git

If you’re wondering how it works and what arguments git clone accepts, go to: http://git-scm.com/docs/git-clone

4

$ git remote update
$ git pull --all

Browser other questions tagged

You are not signed in. Login or sign up in order to post.