get changes from master after creating branch

10,007

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

Share:
10,007

Related videos on Youtube

user9735824
Author by

user9735824

Updated on July 15, 2022

Comments

  • user9735824
    user9735824 almost 2 years

    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.