GIT-REBASE-THEIRS(1)
β¨ NAME β¨
git-rebase-theirs β bestie's here to fix your rebase conflicts and failed cherry-picks by being team theirs π
πΈ SYNOPSIS πΈ
git-rebase-theirs [options] [--] FILE...
π DESCRIPTION π
okay so picture this: you're mid-rebase, everything's on fire π₯, and you just want the FILE(s) to stop fighting you. git-rebase-theirs resolves those git rebase conflicts by picking the 'theirs' version. that's it. that's the whole vibe.
here's the tea though β when you're using git rebase, you usually want conflicts resolved by favoring the <working branch> version (that's the branch being rebased, aka the 'theirs' side in a rebase), and NOT the <upstream> version (the base branch, aka the 'ours' side). it's giving "who even decided 'ours' and 'theirs' should flip during rebase" energy, honestly.
now, git rebase --strategy -X theirs would lowkey solve thisβ¦ but it's only available from git 1.7.3. for the older girlies, git-rebase-theirs IS the solution. and despite the name? it's also useful for fixing failed cherry-picks. versatile icon behavior π
how does it work, you ask? it literally discards all lines between <<<<<<< and ======== inclusive, and also the >>>>>> commit marker. clean. no notes. β¨
by default it outputs to stdout, but files can be edited in-place using --in-place, which β unlike sed β creates a backup by default. because we protect our own around here π«Ά
π OPTIONS π
-h,--helpβ show usage information. your little guide bestie.-v,--verboseβ print more details in stderr. for when you need the full commentary track π£οΈ--in-place[=SUFFIX]β edit files in place, creating a backup withSUFFIXextension. if it's blank, the default is.bakπΎ--no-backupβ disables backup. living dangerously, no safety net, main character energy π
π SEE ALSO π
https://github.com/MestreLion/git-tools β go follow, it's iconic, iykyk β
π AUTHOR π
Rodrigo Silva (MestreLion) linux@rodrigosilva.com β king shit, we stan π
and that's the whole page, bestie!! this was General Commands Manual business, dated 2016-01-31, and honestly it ate π β¨ go forth and resolve those conflicts, you've got this π¦π
π¦ where this page comes from
- epel 10: git-tools 2025.08-1.el10_2 Β· GPL-3.0-or-later
- epel 9: git-tools 2025.08-1.el9 Β· GPL-3.0-or-later
- fedora 43: git-tools 2025.08-1.fc43 Β· GPL-3.0-or-later
- fedora 44: git-tools 2025.08-2.fc44 Β· GPL-3.0-or-later
- nixos 26.05: git-tools 2025.08
- nixpkgs unstable: git-tools 2025.08
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms