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<
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...
, just run git set-upstream
, then git push
again.
Thanks to https://zarino.co.uk/post/git-set-upstream/