Your local master branch is not set up to track remote master branch.
You could do git pull origin master
to tell git the explicit branch you want to pull or you add this to your .git/config:
[branch "master"]
remote = origin
merge = refs/heads/master
When you push to master for the first time, add the -u
switch (git push -u origin master
). This will set everything up automatically.
As it turns out, @Michał Szajbe's answer IS the solution to the problem. The eclipse keys in question are built from the egit "working directory". Should you encounter this problem, then find the .git directory in that working directory and edit the .git/config file with a text editor, adding the section Michal describes. This is in my experience a fairly standard operation these days for cases when you first git init and push to an uninitialized remote, that creates the master branch. I haven't found a way in that case not to do the manual editing in order to git pull, even with command line git.
After the edit is saved, right click on the git repo in your egit "Git Repositories" perspective, and choose properties, you will now see this section of keys has been created (or more likely just read from the config file) and a remote master to local master git pull will operate as expected going forward.
It's possible that you could enter these keys and values yourself, but copying and pasting what Michal shows is certainly a lot faster and probably safer. I didn't actually try adding the keys manually through the property editor nor am I likely to, as I know this method works, and makes sense since egit is simply calling through to the local git repo.
I am also supporting some people in my office who are using Flex and the Flexbuilder editor which is built on top of eclipse and egit. These instructions are equally relevant to them.
To fix this problem in Eclipse, open the Windows menu and select Show View / Other / Git Repositories.
From the Git Repositories tab:
Again, from the Git Repositories tab:
Again, from the Git Repositories tab:
(1)
Key = branch.master.remote
Value = origin
(2)
Key = branch.master.merge
Value = refs/heads/master
This worked for me:
Right-click my checked-out local branch that can't pull (mine's called "development") Select "Configure Branch..." For "Upstream Branch:", I selected "refs/heads/development" For "Remote:" I selected "origin" Left "Rebase" unchecked Hit OK
Now my config pref window looks like the one in gview's answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With