lab 24 Merging Fetched Changes

Goals

Merge the fetched changes into local master branch 01

Execute:

git merge origin/master

Output:

$ git merge origin/master
Updating 6b47582..ff726ab
Fast-forward
 README | 1 +
 1 file changed, 1 insertion(+)
$

Check the README again 02

We should see the changes now.

Execute:

cat README

Output:

$ cat README
This is the Hello World example from the git tutorial.
(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.

Pulling changes03

Discussion

Next let’s take a look at combining the fetch & merge process into a single command. We’re not going to go through the process of creating another change and pulling it again, but we do want you to know that doing:

git pull

is indeed equivalent to the two steps:

git fetch
git merge origin/master

Table of Contents