git checkout tag, git pull fails in branch

后端 未结 14 574
渐次进展
渐次进展 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:08

    You need to set up your tracking (upstream) for the current branch

    git branch --set-upstream master origin/master
    

    Is already deprecated instead of that you can use --track flag

    git branch --track master origin/master
    

    I also like the doc reference that @casey notice:

    -u 
      Set up 's tracking information so  is considered  
      's upstream branch. If no  is specified,  
      then it defaults to the current branch.
    

提交回复
热议问题