I clone one branch from the repository and create a tag in a python script. The commands are as follows.
git clone -b master --single-branch <repository adress> git tag -a testag -m 'test'
It successfully clones, but when it comes to adding a tag, it breaks with the following error:
fatal: Failed to resolve 'HEAD' as a valid ref.
git
Ahmad
source share