Portmint Lighthouse

Merging & Putting It Together

Here is the plain idea: merging is folding the work from one branch back into another — usually bringing a finished experiment home into your main version. It's the happy ending to the branch story.

This last stop ties everything together: commits, history, undo, and branches all meet in one smooth, everyday rhythm you can actually use.

Folding the alternate draft back in

Remember the author's experiment notebook — the one where chapter five took a bold turn? The idea worked. Now those pages need to join the real manuscript.

The author lays the experiment notebook beside the main book and weaves the new pages in. The main manuscript now contains the bold ending; the experiment is part of the canon. That folding-in is a merge.

Most of the time Git does this for you automatically, because the two notebooks changed different parts of the book. It simply combines them and you're done.

When two drafts disagree

Sometimes both notebooks edited the very same sentence in different ways. Git can't guess which you meant, so it pauses and asks. This is a merge conflict.

It sounds scary; it isn't. Picture two editors who rewrote the same line differently. Git shows you both versions side by side and asks, "which do you want — or a blend?" You pick, you save the choice, and the merge finishes. A conflict isn't an error; it's Git being honest that a human decision is needed.

Sharing and backing up online

Everything so far lived on your own computer. The optional final layer is keeping a copy online, on a site like GitHub.

Picture mailing a copy of your whole bound notebook to a trusted library. Sending your latest work up is called a push; pulling down work from there is a pull. This does two lovely things: it backs up your history offsite (a dead laptop no longer means lost work), and it lets others read or contribute. Useful, but never required — Git is whole without it.

The whole rhythm, in one breath

Here's the complete loop you've now learned, start to finish:

You work in a repository. You make changes in your working directory, choose the good ones by staging them, and seal them as a commit with a clear message. Those commits form a readable history you can scroll through and safely undo. For anything risky, you spin off a branch, experiment in peace, then merge it back into main when it's good. Optionally, you push it all online to back up and share.

That's it. That's version control — the same calm cycle whether you're writing code, a book, or your grocery list.

Your turn — and your capstone

Now make it real. Take a project that matters to you — a personal journal, a recipe collection, a story — and put it under version control. Take several thoughtful commits with honest messages so you build a genuine history. Create a branch to try a bold change, and either merge it home or abandon it. Then practice one confident undo.

When you can scroll your own history and read the story of your work, you've proven the whole course. You've traded the final-v3-REAL folder for something far better: fearlessness. 🔦

You finished the course 🎉

Want this kind of AI — branded, on your site, answering from your business's own knowledge? Leave your details and Portmint will reach out.

No spam. We'll only use this to follow up about your AI.