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 currentHEADis 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
- ubuntu stonking: git-extras 7.5.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms