The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Practical Git: Clean up commits with git rebase

Practical Git: Clean up commits with git rebase

5:42
Sometimes its nice to clean up commits before merging them into your main code repo; in this lesson, we go over using `git rebase` to `squash` commits together and then rename the condensed commit message. We also talk about potential issues with rebasing and where to be careful.
Watch this lesson now
Avatar
egghead.io

Sometimes its nice to clean up commits before merging them into your main code repo; in this lesson, we go over using git rebase to squash commits together and then rename the condensed commit message. We also talk about potential issues with rebasing and where to be careful.

Avatar
CG

You could have pointed out that when doing interactive rebasing the commits are actually shown in reverse order (aka chronological order) and not in the "normal" order like for example with git log where the last commit is first.
It's more obvious then why you do need to leave the first commit in the list with the pick option because it's the oldest commit in which you "meld" the rest of the commits.
Also you didn't present the commit --amend option. Knowing about that helped me understand easier what a squash is.
Great course though. Really like the format. Cheers.

In reply to egghead.io
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?