Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » 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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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: Sat Jul 19 18:58:31 EDT 2025

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

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

Back to the top