Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Git Merge

20200908 A pull will do a fetch followed by a merge. A merge will update the local repository to incorporate the current updates from the remote repository.

An alternative to doing a merge is to do a rebase which updates the local repository changes to be based on the sequence of updates from the remote repository. Hence it is rebased!

That is, a fetch:

- o - o - o - H - A - B - C (main)
               \
                P - Q - R (origin/main)

A merge:

- o - o - o - H - A - B - C - X (main)
               \             /
                P - Q - R --- (origin/main)

A rebase:

- o - o - o - H - P - Q - R - A' - B' - C' (main)
                          |
                          (origin/main)

C' and X should be identical. The history will look different.

A merge is probably better than a rebase in the case where someone else has pulled from your main branch.


Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. Creative Commons ShareAlike V4.