How to do a “git checkout -b ” from a remote tag

前端 未结 4 546
不知归路
不知归路 2021-02-03 20:32

I\'m trying to create a branch from a remote tag, but it seems there\'s no way to do it. When I try

git checkout -b test origin/deploy

where or

4条回答
  •  执笔经年
    2021-02-03 21:03

    I'm not a git guru, but I had used something like this before and it seemed to have worked fine:

    git pull (or fetch, just need to make sure you are updated)
    git checkout -b test remotes/origin/deploy
    

提交回复
热议问题