git push origin HEAD:<name-of-remote-branch>报错

git推送时报错:

fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use

    git push origin HEAD:<name-of-remote-branch>

解决:直接后面写你要推送到的远程分支名

git push origin HEAD:master

猜你喜欢

转载自blog.csdn.net/weixin_44949068/article/details/129703457