Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git clone -b tag results in - warning: Remote branch not found in upstream origin, using HEAD instead

Tags:

git

If you try to clone a git repo and checkout a tag in a single command by using the -b or --branch flag for clone:

git clone -b v0.8.2 https://github.com/chaoslawful/lua-nginx-module.git

You may run into an error such as:

warning: Remote branch v0.8.2 not found in upstream origin, using HEAD instead
like image 828
wbond Avatar asked Jun 20 '13 14:06

wbond


1 Answers

Checking out a tag via a git clone call is not supported by git before version 1.7.10. Instead it is necessary to execute:

git clone https://github.com/chaoslawful/lua-nginx-module.git
cd lua-nginx-module
git checkout v0.8.2
cd ..
like image 86
wbond Avatar answered Oct 12 '22 22:10

wbond