1

I have to clone a tag of a branch. I am using git 1.7.1 client.

git clone --branch <tag_name> <repository_url> command is not working its just cloning the branch till tip, I think. The above command is showing the following line at the end.

warning: Remote branch v7_3 not found in upstream origin, using HEAD instead

Chandu
  • 1,837
  • 7
  • 30
  • 51
  • You can also look here if you already cloned the project: http://stackoverflow.com/questions/34519665/how-to-move-head-checkout-revert-reflog-reset/34519716#34519716 – CodeWizard Feb 09 '16 at 12:56

2 Answers2

5

The command you are using is not supported in git 1.7, so you have to either switch to version 1.8 or you can use below to continue working with git 1.7

First you have to download whole repository with :

 git clone <repository url>

Then to checkout specific tag please use below command :

git checkout tags/<tag_name>
SnehalK
  • 699
  • 4
  • 12
0

The warning tells you everything you need to know; that tag does not exist. Note that even if it did, the command you used would still clone the whole repository; it would just point HEAD to v7_3 afterwards (and you would be in a detached HEAD state to boot).

Is it possible that you created the tag on another machine, and forgot to push it?

David Deutsch
  • 17,443
  • 4
  • 47
  • 54