I am converting a SVN repository to a Git repository following guidance from Pro Git (found here: http://progit.org/book/ch8-2.html ).
After pushing to my newly created remote, I did a clone from said remote. New clone did not have any information about my tags. I then did a ‘git push –tags’ from the original. However, when doing a ‘git pull’ in the clone, only a few of the tags come down.
From inside the clone, ‘git ls-remote’ shows all of my tags (and branches). I removed the hashes for clarity:
HEAD
refs/heads/STABLE-1.0
refs/heads/UNSTABLE-1.0
refs/heads/master
refs/tags/RELEASE-0.4
refs/tags/RELEASE-0.9
refs/tags/RELEASE-1.0
refs/tags/STABLE-1.0
refs/tags/UNSTABLE-1.0
However, doing a ‘git tag -l’ only shows:
RELEASE-1.0
UNSTABLE-1.0
Remote branches seem to be tracking fine. Only artifact I noticed there is the orignal git-svn repo has the local and remote branches still. That should not matter since I will be working in a clone, and once I confirm all data is migrated, the git-svn repo can be decommissioned.
So why do the remote and local tags not match?
Try
git fetch --tags– from git-fetch documentation: