我创建了一个从另一个远程存储库镜像的新本地 git 存储库:
git init
git remote add original {url}
git pull original master
git remote add origin {url}
git push -u origin master
这将创建一个original
主分支的镜像。现在我想从original
.
命令应该是什么样子?我试过git checkout -b newbranch original/tagname
了,但我得到了:
fatal: Cannot update paths and switch to branch 'newbranch' at the same time.
Did you intend to checkout 'original/tagname' which can not be resolved as commit?