Loading...

Git Tutorial

Merging pulled changes in git

To learn to get the fetched changes into the current branch and working directory.

Step1:Merge the pulled changes into the local master branch

RUN:

git merge origin/master

RESULT:

$ git merge origin/master
Updating 6e6c76a..2faa4ea
Fast-forward
 README |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Step2:Check the README again

Now we should see the changes.

RUN:

cat README

RESULT:

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

These are the changes. Although “git fetch” does not merge the changes, we can manually merge them from the remote repo.

Next

Now let’s have a look at combining fetch & merge into a single command.