Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » pull from another remote/branch(how to pull from another remote/branch, for example when working on a forked repo.)
pull from another remote/branch [message #976353] Thu, 08 November 2012 09:13 Go to next message
Tobias Heine is currently offline Tobias Heine
Messages: 2
Registered: November 2012
Junior Member
hy,
I am new to EGit and I cant find a way to specify the remote/branch I want to pull from.
Lets say I work on my forked repo and want to pull anytime from the original repo.

thx in advance for help on it Smile

tobi
Re: pull from another remote/branch [message #976550 is a reply to message #976353] Thu, 08 November 2012 12:11 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 347
Registered: December 2010
Location: Germany
Senior Member
Hi Tobi,

Best approach is imho to have a local branch pointing to the remote branch
- Choose "Team > Switch To > New Branch..."
- Pick the remote branch from the "Source ref:" drop down
You can then easily pull this branch while it is active.

Greetings
Christoph
Re: pull from another remote/branch [message #977448 is a reply to message #976550] Fri, 09 November 2012 04:43 Go to previous messageGo to next message
Tobias Heine is currently offline Tobias Heine
Messages: 2
Registered: November 2012
Junior Member
Hy Christoph,
thx for reply. I am not sure how this will help, or maybe I do not understand.

So here is our working environment:
- Everyone has a fork of our main repo
- we commit on the fork and send then pull requests to the main repo
- another person merges anytime the pull request
- now I need to pull from the main repo and merge new stuff to my fork

So my local branch points to the remote on the fork, but if someone added new stuff to the main I have to pull from there and merge the changes into my fork.

cherrs,
tobi
Re: pull from another remote/branch [message #979145 is a reply to message #977448] Sat, 10 November 2012 12:18 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
You can fetch from anywhere via the 'Fetch from Another Repository' dialog. There are at least two ways to get there:

1) 'Team -> Remote -> Fetch From...' on the right-click popup menu in an Explorer view
2) 'Fetch...' on the right-click popup menu of the entries in the Git Repositories view.
Re: pull from another remote/branch [message #985824 is a reply to message #977448] Fri, 16 November 2012 04:51 Go to previous message
Stefan Lay is currently offline Stefan Lay
Messages: 340
Registered: July 2009
Senior Member
Could you describe in more detail which branches are on the central repository? If you have a master branch there and if you cloned from there then a pull will actually pull from that master either if you
- have checked out the master branch
- have created your local branch in the way Christoph describes

I personally do not use pull anymore, I use just fetch and decide afterwards when I want to rebase my local changes.
Previous Topic:GIT Hooks
Next Topic:Force using JSch instead of TortoisePlink on Windows ?
Goto Forum:
  


Current Time: Fri Aug 29 04:04:24 EDT 2014

Powered by FUDForum. Page generated in 0.05963 seconds