Merging Pulled Changes

Goals

  • Learn to get the pulled changes into the current branch and working directory.

Merge the fetched changes into local master

Execute:

  1. git merge origin/master

Output:

  1. $ git merge origin/master
  2. Updating e0cc19e..b39ac69
  3. Fast-forward
  4. README | 1 +
  5. 1 file changed, 1 insertion(+)

Check the README again

We should see the changes now.

Execute:

  1. cat README

Output:

  1. $ cat README
  2. This is the Hello World example from the git tutorial.
  3. (changed in original)

There are the changes. Even though “git fetch” does not merge the changes, we can still manually merge the changes from the remote repository.

Up Next

Next let’s take a look at combining the fetch & merge process into a single command.