GIT-MERGE-INTO(1)

πŸ‘‘ GIT-MERGE-INTO πŸ’…

okay bestie, welcome to Git Extras β€” we're looking at git-merge-into, and honestly? it's the friend that merges your branch for you and doesn't drag you along for the ride. you stay exactly where you are. main character energy, truly.


✨ NAME ✨

git-merge-into β€” merge one branch into another πŸ¦‹


🌸 SYNOPSIS 🌸

git merge-into [src] <dest> [--ff-only]

πŸ’– DESCRIPTION πŸ’–

so here's the vibe: this bad boy merges one branch into another, and the whole time it keeps you sitting on your current branch. no being yanked around, no "wait where am I now" moment. 🫢

and if you don't pass a src branch at all? no stress, it just takes the branch you're currently on and merges that one into dest. lowkey the easiest thing ever.


πŸŽ€ OPTIONS πŸŽ€

  • <src> β€” the name of the branch that's getting merged into stuff. if you don't give it, it just defaults to whatever branch you're standing on right now. periodt.
  • <dest> β€” the name of the branch you're merging into. the destination. the final boss. πŸ‘‘
  • --ff-only β€” the strict one. it will straight up refuse to merge and exit with a non-zero status unless the current HEAD is already up-to-date, or the merge can be resolved as a fast-forward. no messy merge commits allowed, we only fast-forward in this house. πŸ’…

🌈 EXAMPLES 🌈

okay imagine the history looks like this, and you're currently on the branch src:

                     A---B---C src(current)
                    /
               D---E---F---G dest

then you run git merge-into dest and boom πŸ’₯ it turns into this:

                    A---B---C src(current)
                    /         \
               D---E---F---G---H dest

that H commit is recording the merge result, literally the exact same way plain old git merge does it. and src? still your current branch. it never moved. iconic behaviour, honestly. ✨

now the tea πŸ“: the default implementation of merge-into uses git checkout and git merge under the hood, which means your working tree might get temporarily changed. so if you know your branch can be merged fast-forward, just add --ff-only and avoid all that file-churn drama entirely. 😌

ngl, that temporary working tree change is the little gremlin hiding in the default path. --ff-only is your bestie-shaped escape hatch.

🌟 AUTHOR 🌟

Written by spacewander <spacewanderlzx@gmail.com> β€” thank you for your service, legend 🫑


πŸ’€ REPORTING BUGS πŸ’€

found a gremlin? tell us here:

<https://github.com/tj/git-extras/issues>


🧚 SEE ALSO 🧚

<https://github.com/tj/git-extras>


and that's the whole page, babes πŸ’œ this was Git Extras, GIT-MERGE-INTO(1), dropped May 2026 β€” go merge something responsibly, and remember: stay on your branch, slay your history. πŸŒΈβœ¨πŸ’…

πŸ“¦ where this page comes from