git clone -b tag results in - warning: Remote branch not found in upstream origin, using HEAD instead
12,317
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 ..
Author by
wbond
Updated on June 14, 2022Comments
-
wbond almost 2 years
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