How can someone using egit/eclipse pull a remote branch that I created without using command line?

StackOverflow https://stackoverflow.com/questions/21145321

  •  28-09-2022
  •  | 
  •  

Question

This is probably quite simple, but I am just not familiar with eclipse. I have a dev branch that I have pushed to the server for review using the basic git push origin dev. My co-worker is new to git and would prefer to stay within eclipse to review the code. He has egit installed and I cannot seem to find a way to pull a specific remote branch. I know this is brief but I am more than willing to provide any information for clarification.

Was it helpful?

Solution

To easily review the changes, your co-worker can check out the remote branch as a new local branch and then look at the code and commits.

One possible way is:

  1. Team > Fetch from Upstream to get the newest branches (or a normal pull, which includes a fetch)
  2. Team > Switch to > New Branch...
  3. Select origin/dev (assuming the remote is named origin) as the base branch
  4. Click Finish to check out the new local dev branch

It can also be done via the Git Repositories view by expanding Branches > Remote Tracking and using Create Branch... from the context menu.

Another way is to find the branch in the History view (you may need to toggle the Show All Branches and Tags option, see here) and use Create Branch... there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top