Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git tags disappear when doing a push then clone?

Tags:

git

tags

We have a repository with multiple tags. Each tag represents a version of the software. We are pushing the repository to a remote server.

When we do a fresh clone off the remote server, the tags are no longer there. How do you ensure other developers or clients can check out specific versions of software off the remote server?

like image 942
corydoras Avatar asked Oct 27 '09 03:10

corydoras


2 Answers

git push --tags or git push remote tag-name

like image 87
Brian Campbell Avatar answered Sep 18 '22 17:09

Brian Campbell


Alternate solution to the one given by Brian Campbell would be to configure remote to push all refs, or push all branches and tags:

[remote "repository"]
        url = [email protected]:user/repo.git
        push  = +refs/heads/*:refs/heads/*
        push  = +refs/tags/*:refs/tags/*
like image 38
Jakub Narębski Avatar answered Sep 17 '22 17:09

Jakub Narębski