auto* sub = app.add_subcommand("merge", "Join two or more development histories together");
sub->add_option("<branch>", m_branches_to_merge, "Branch(es) to merge");
// sub->add_flag("--no-ff", m_no_ff, "Create a merge commit in all cases, even when the merge could
// instead be resolved as a fast-forward."); sub->add_flag("--commit", m_commit, "Perform the merge and
// commit the result. This option can be used to override --no-commit.");
sub->add_flag(
"--no-commit",
m_no_commit,
"With --no-commit perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing. \nNote that fast-forward updates do not create a merge commit and therefore there is no way to stop those merges with --no-commit. Thus, if you want to ensure your branch is not changed or updated by the merge command, use --no-ff with --no-commit."
);
sub->add_flag(
"--abort",
m_abort,
"Abort the current conflict resolution process, and try to reconstruct the pre-merge state. If an autostash entry is present, apply it to the worktree.\nIf there were uncommitted worktree changes present when the merge started, git merge --abort will in some cases be unable to reconstruct these changes. It is therefore recommended to always commit or stash your changes before running git merge.\ngit merge --abort is equivalent to git reset --merge when MERGE_HEAD is present unless MERGE_AUTOSTASH is also present in which case git merge --abort applies the stash entry to the worktree whereas git reset --merge will save the stashed changes in the stash list."
);
sub->add_flag(
"--quit",
m_quit,
"Forget about the current merge in progress. Leave the index and the working tree as-is. If MERGE_AUTOSTASH is present, the stash entry will be saved to the stash list."
);
sub->add_flag(
"--continue",
m_continue,
"After a git merge stops due to conflicts you can conclude the merge by running git merge --continue"
); // (see "HOW TO RESOLVE CONFLICTS" section below).