Download a specific tag with Git



  • 3 Answer(s)

    Try this best solution:

    $ git clone
    

    The whole repository.:

    Later the clone, you can list the tags with $ git tag -l then checkout a specific tag:

    $ git checkout tags/<tag_name>
    

    Checkout and create a branch named after the revision number of tag:

    $ git checkout tags/<tag_name> -b <branch_name>
    
    Answered on December 21, 2018.
    Add Comment

    Here the alternative solution:

    git clone --branch my_abc http://git.abc.net/git/abc.git
    

    you are interested in clone to repository  and leave you on the tag.

    Documentation for 1.8.0 of git clone states

    –branch can also take tags and detaches the HEAD at that commit in the resulting repository.

    Answered on December 21, 2018.
    Add Comment

    Checking out a given tag for deployment.

    git clone -b 'v2.0' --single-branch --depth 1 https://github.com/git/git.git
    

    The fastest way to check out code from a remote repository  and the most recent code  instead to  complete .

    Answered on December 21, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.