Question:
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 successfully created a new repo and committed files.
Today I did changes to the repository from another computer, I’ve committed the changes and now I’m back home and performed a git pull
to update my local version and I get this:
1 2 3 4 5 6 7 8 9 10 |
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 If you wish to set tracking information for this branch you can do so with: git branch --set-upstream develop origin/ |
the only contributor to this repo is me and there are no branches (just a master). I’m on windows and I’ve performed the pull from git bash:

git status:
1 2 3 4 |
$ git status # On branch master nothing to commit, working directory clean |
git branch:
1 2 3 |
$ git branch * master |
What am I doing wrong?
Answer:
You could specify what branch you want to pull:
1 2 |
git pull origin master |
Or you could set it up so that your local master branch tracks GitHub master branch as an upstream:
1 2 3 |
git branch --set-upstream-to=origin/master master git 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.