There is no tracking information for the current branch There is no tracking information for the current branch git git

There is no tracking information for the current branch


You could specify what branch you want to pull:

git pull origin master

Or you could set it up so that your local master branch tracks github master branch as an upstream:

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

This branch tracking is set up for you automatically when you clone a repository (for the default branch only), but if you add a remote to an existing repository you have to set up the tracking yourself. Thankfully, the advice given by git makes that pretty easy to remember how to do.


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/


ComputerDruid's answer is great but I don't think it's necessary to set upstream manually unless you want to. I'm adding this answer because people might think that that's a necessary step.

This error will be gone if you specify the remote that you want to pull like below:

git pull origin master

Note that origin is the name of the remote and master is the branch name.


1)How to check remote's name

git remote -v

2) How to see what branches available in the repository.

git branch -r