Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

Merging and Rebasing

Give Feedback

This lesson covers two ways of getting commits from one branch to another: merging and rebasing. You’ll learn what is involved in each method as well as how to decide on which one to use in your projects.

vincentstclair on Aug. 6, 2020

When you say merging creates a new commit that combines the top checksums of the two branches into one, what does this mean and why is this useful?

Bartosz Zaczyński RP Team on Aug. 6, 2020

Git uses SHA-1 checksums to identify commits. They’re nothing more than unique IDs expressed as hexadecimal numbers such as a7f0b04.

Merging two or more branches into one often results in creating a new commit, which becomes the child of the most recent commits in all parent branches. I think that’s what Paul meant by “top checksums.”

It’s useful because commits can be shared across multiple branches without duplication. (They form a directed acyclic graph.)

Doug Ouverson on Nov. 2, 2020

Great tutorial Paul.

At 3:03 of Merging and Rebasing you mentioned a resource on RP that discussed in further detail merging and rebasing.

I did a search and the only resource I could find was realpython.com/python-git-github-intro/#putting-it-all-together-simple-git-workflow

But when I search page for rebasing there was no resources? realpython.com/python-git-github-intro/#rebasing

Kind regards,

Doug Ouverson on Nov. 2, 2020

I did find this resource which looks pretty awesome. And you did plug the free Pro Git book.

So, between these 2 resources, I’m sure the subject of rebasing will be explained in more detail.

Your explanation was a good primer!

Become a Member to join the conversation.