user9735824
user9735824

Reputation: 1256

get changes from master after creating branch

I am using Egit with eclipse for working on my java project. I created a branch called branch1 from master and started working on it.

In the mean time my colleague created another branch branch2 from master, made some changes and merged branch2 back to master.

Now I need to get all the changes that were made on master to my branch branch1.

How can I achieve this using eclipse or github and not using any command.

Upvotes: 5

Views: 19193

Answers (1)

Marteng
Marteng

Reputation: 1305

Using Eclipse/EGit:

  1. Open the "Git Repositories" View
  2. Make sure branch1 is checked out (respectively the branch you want to update with changes of the remote master branch).
  3. Right-click the repository you're working on and click on Fetch from Upstream. This will fetch information about new commits on the remote repository (in your case the new commits that were added to the master branch after your branch (branch1) was created). enter image description here

  4. Expand the Remote Tracking node and right-click the master branch. Select either Merge or Rebase on. Both options update your branch (branch1) with the changes that meanwhile were added to the master branch.enter image description here

The difference between Merge and Rebase on: https://stackoverflow.com/a/16666418/5207900

Upvotes: 6

Related Questions