Skip to content

jwjacobson/merge_lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merge Lab

Understanding merge commits, squash merging, and rebasing

While working through Adam Johnson's excellent Boost your Git DX, I decided to make a repo to help solidify how the different merging strategies work. I created and modified some trivial files through three different PRs, merging each using one of the strategies.

Here is a summary of my findings:

Merge commit

Commits from the feature branch appear sequentially in the main branch's commit history, plus an extra Merge commit that shows all the changes together.

Squash merge

Only the squash merge commit appears in the main branch's commit history (no individual commits from the feature branch); however, by default, it will include each individual commit message in the details when you click on it.

Rebase

Only the individual commits from the feature branch appear in the main branch's commit history (no merge commit); the original commit time is also lost, as each commit is dated to the time of rebase.

You can check the commit history to see how these work in detail, but it will probably be more tangible for you if you create your own repo and try this out yourself.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •