git tag: fatal: Failed to resolve 'HEAD' as a valid ref

前端 未结 5 1155

I am cloning a single branch from a repository and creating a tag in a python script. The commands are as follows.

git clone -b master --single-branch 

        
5条回答
  •  天涯浪人
    2020-12-17 19:08

    I ran into the same issue and was able to fix it by changing from

    git tag -a testtag -m 'test'
    

    to

    git tag -a testtag -m "test"
    

    I was running in Windows 7. Hope this helps :-)

提交回复
热议问题