git checkout tag, git pull fails in branch

后端 未结 14 571
渐次进展
渐次进展 2021-01-29 22:51

I have cloned a git repository and then checked out a tag:

# git checkout 2.4.33 -b my_branch

This is OK, but when I try to run git pull<

相关标签:
14条回答
  • 2021-01-29 23:26

    Try this

    git checkout master
    
    git pull origin master
    
    0 讨论(0)
  • 2021-01-29 23:31

    Edit: For newer versions of Git, --set-upstream master has been deprecated, you should use --set-upstream-to instead:

    git branch --set-upstream-to=origin/master master
    

    As it prompted, you can just run:

    git branch --set-upstream master origin/master
    

    After that, you can simply run git pull to update your code.

    0 讨论(0)
提交回复
热议问题