git-annex-resolvemerge(1)
π git-annex-resolvemerge β from the git-annex manual, bestie
okay so this page lives in the git-annex manual (General Commands Manual, if you're fancy) and it's literally just about fixing merge conflicts. no cap.
β¨ NAME β¨
git-annex-resolvemerge β resolve merge conflicts π«Ά
πΈ SYNOPSIS πΈ
git annex resolvemerge
that's it. that's the whole command. iconic.
π¦ DESCRIPTION π¦
so this bad boy automatically resolves a conflicted merge. and like, plot twist, it's already happening behind your back β git annex sync and git annex merge do this automatically. you're just here for the solo version.
here's the tea, case by case:
- when two trees being merged contain conflicting versions of an annexed file, the merge conflict gets resolved by adding both versions to the tree, using variants of the filename. both girls get to stay. π
- when one tree modified the file and the other tree deleted it, the conflict gets resolved by adding the modified file using a variant of the filename, and the original filename stays deleted. no resurrection, sorry.
- when the merge conflict involves a file that's annexed in one tree but not annexed in the other tree, it gets resolved by keeping the non-annexed file as-is, and adding the annexed version using a variant of the filename.
β οΈ ok important caveat, don't skip this: only merge conflicts that involve one or more annexed files get resolved. merge conflicts between two files that are not annexed will not be automatically resolved. those are your problem, bestie. π
π EXAMPLES π
let's set the scene. β¨
scenario one: the classic
suppose Alice commits a change to annexed file foo, and Bob commits a different change to the same file foo.
merging between them will then fail, and git will present the merge conflict as a file foo pointing to one version of the git-annex symlink, with git status indicating that foo has an unresolved conflict. π«
running git annex resolvemerge in this situation will resolve the merge conflict, by replacing the file foo with files named like foo.variant-c696 and foo.variant-f16a. one of the files has the content that Alice committed, and the other has the content that Bob committed.
then you, the main character, can examine the two variants of the file, and either merge the two changes into a single file, or rename one of them back to foo and delete the other. your call, queen. π
scenario two: the delete situation
now suppose Alice commits a change to annexed file bar, while Bob commits a deletion of the same file bar. merging will fail. running git annex resolvemerge in this situation will resolve the merge conflict by making a file with a name like bar.variant-421f containing Alice's version. the bar file remains deleted. the user can later examine the variant of the file and either rename it back to bar, or decide to delete it too.
rip to Bob's deletion but Alice is different. π
π OPTIONS π
- the
git-annex-common-options(1)can be used. that's the whole list. go off, common options. π₯
π SEE ALSO π
π AUTHOR π
Joey Hess <id@joeyh.name> β we stan. π«Ά
and that's the whole page, bestie!! this was git-annex-resolvemerge(1) from the git-annex manual β no version or date info was on the page, so consider this your cute sign-off instead. go resolve those merges, you've got this. πβ¨π
π¦ where this page comes from
- alpine 3.24: git-annex-doc 10.20261026-r0 Β· AGPL-3.0-or-later
- arch rolling: git-annex 10.20261026-2 Β· AGPL-3.0-only
- debian bookworm: git-annex 10.20230126-3 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2 Β· AGPL-3.0-or-later
- debian trixie: git-annex 10.20250416-2+deb13u1 Β· AGPL-3.0-or-later
- epel 10: git-annex 10.20250320-1.el10_0 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250630-4.fc43 Β· AGPL-3.0-or-later
- fedora 43: git-annex 10.20250929-5.fc43 Β· AGPL-3.0-or-later
- fedora 44: git-annex 10.20260115-1.fc44 Β· AGPL-3.0-or-later
- nixos 26.05: git-annex 10.20260421
- nixpkgs unstable: git-annex 10.20260421
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- opensuse-leap 16.0: git-annex 10.20250828-bp160.1.1 Β· AGPL-3.0-or-later AND GPL-3.0-or-later AND BSD-2-Clause AND MIT AND GPL-2.0-only
- ubuntu noble: git-annex 10.20240129-1build1 Β· AGPL-3.0-or-later
- ubuntu questing: git-annex 10.20250721-1
- ubuntu resolute: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- ubuntu stonking: git-annex 10.20251029-1ubuntu1 Β· AGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms