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

前端 未结 5 1160

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 18:55

    I also faced git tag: fatal: Failed to resolve 'HEAD' as a valid ref issue when I was missing -m in the following command.(during tag creation)

    git tag -a testtag 'test'
    

    changing to

    git tag -a testtag -m 'test'
    

    fixed the issue

提交回复
热议问题