There is no tracking information for the current branch

后端 未结 13 2656
无人及你
无人及你 2020-11-27 23:59

I\'ve been using github from a relatively short period, and I\'ve always used the client to perform commits and pulls. I decided to try it from the git bash yesterday, and I

13条回答
  •  一整个雨季
    2020-11-28 00:44

    See: git checkout tag, git pull fails in branch

    If like me you need to do this all the time, you can set up an alias to do it automatically by adding the following to your .gitconfig file:

    [alias]
        set-upstream = \
           !git branch \
               --set-upstream-to=origin/`git symbolic-ref --short HEAD`
    

    When you see the message There is no tracking information..., run:

     git set-upstream
     git push
    

    Thanks to https://zarino.co.uk/post/git-set-upstream/

提交回复
热议问题