Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Pull with EGit
Pull with EGit [message #915194] Sun, 16 September 2012 19:34 Go to next message
Jeremy Krentz is currently offline Jeremy KrentzFriend
Messages: 2
Registered: September 2012
Junior Member
Hi all,

I'm new to EGit so someone please correct me if I'm doing something incorrectly. I've been reading various forum posts saying that EGit has a bug that doesn't allow for easy use of the Pull function after creating a new repository. Is this correct?

Here are my steps:

1. After creating a new Java Project and adding a main class, I create a new repository (Right click on project name in eclipse --> Team --> Share Project --> Git --> Create Repository)

2. After committing locally, I'm able to push my project to a new repository on github.

However, now if I right click on my project in "git repositories view" and Pull, I receive the following error:

"The current branch is not configured for pull
No value for key branch.master.merge found in configuration"

After some searching, I read that the only way to fix this is by adding the following keys to /.git/config

[branch "master"]
remote = origin
merge = refs/heads/master

Now I'm able to pull successfully.

My question is, is this normal? Does a person always have to modify the config file when creating a new repository? Is there a better way to do this?

When I 'clone' a repository, the keys are automatically added to the config file. It seems strange to me.

So currently the fastest way I've found to get things up and running has been to:
1. Push the project to github
2. Delete the local repository and associated project
3. Clone the repository from github

Now pulls works without issue.

If someone can explain if I should be doing something differently it would be very much appreciated.

Jeremy

Re: Pull with EGit [message #915222 is a reply to message #915194] Sun, 16 September 2012 21:27 Go to previous message
Jeremy Krentz is currently offline Jeremy KrentzFriend
Messages: 2
Registered: September 2012
Junior Member
I've since been informed that this can also be done another way:

In the Git Repository View, go to branches, Local -> master. Right click and go to Configure Branch, and then set the upstream branch as refs/heads/master

Is this the best way?
Previous Topic:create patch and gitignore
Next Topic:Error when trying to use existing git repository
Goto Forum:
  


Current Time: Tue Mar 19 03:43:14 GMT 2024

Powered by FUDForum. Page generated in 0.01670 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top