Merge, conflict!

Photo by GR Stocks on Unsplash

Merge, conflict!


1 min read

New features ๐ŸŽ‰

paper now supports hr markdown syntax --- and lang flag for specifying language inside generated .html files.

Fortunately, the two commits didn't have any conflicts. The first one was fast-forward, and the second one was merged recursively without me doing anything.

But, I learnt that rebasing commits are more preferable for merging branches. To sync up with the main branch, instead of git merge main, you do git rebase main. Rebasing walks you through all your changes that cause conflicts, and at the end, creates a linear commits history.

In other words, git merge resolves conflicts by smashing the two branch together and create a new commit to resolve those conflicts. Meanwhile, git rebase lifts off your branch base commit (the commit where your branch detaches from the main branch), and put that base at the HEAD of main branch. Neat.

Additional resources