Bootstrap FreeKB - Git (Version Control) - Resolve "There is no tracking information for the current branch"
Git (Version Control) - Resolve "There is no tracking information for the current branch"

Updated:   |  Git (Version Control) articles

Let's say you issue the git pull command and "There is no tracking information for the current branch" is returned.

#]$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> feature/foo

 

Often, this means you are not on the master branch, which can be seen with the git branch --all command.

]$ git branch --all
* feature/foo
  feature/bar
  master
  remotes/origin/HEAD -> origin/master
  remotes/origin/feature/foo
  remotes/origin/feature/bar

 

Sometimes, using the git pull origin master command will be successful. But still, plain ole git pull may still return "There is no tracking information for the current branch".

~]$ git pull origin master
From ssh://git.example.com:7999/my/repo
 * branch            master     -> FETCH_HEAD
Already up-to-date.

 

In this scenario, you'll probably want to issue the git branch command with the --set-upstream-to option.

~]$ git branch --set-upstream-to=origin/master feature/foo
Branch feature/foo set up to track remote branch master from origin.

 

And then, plain ole git pull may now work properly.

~]$ git pull
Already up-to-date.

 

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 150b4a in the box below so that we can be sure you are a human.