Expand description
mkit merge <branch> | --continue | --abort — merge a branch into
HEAD, with a resolvable-conflict workflow (#177).
Behaviour:
- Resolve HEAD (ours) and the target ref (theirs).
- If equal → “already up to date”.
- Find the merge base; if
base == ours, fast-forward HEAD to theirs and restore the worktree to theirs’ tree. - Otherwise run a 3-way tree merge. On conflict, materialise the
conflict material (markers for text, ours-side for binary/special)
into the worktree + index, persist
MERGE_HEAD/MERGE_MSG/ORIG_HEADand themkit-conflictssidecar, and exit non-zero with resolve instructions. The user resolves,mkit adds, then runsmkit merge --continue. - Clean merge: sign a new merge commit with two parents and advance the current branch.
--continue refuses unless MERGE_HEAD exists and no marker-bearing
conflicting file remains; it builds the final tree from the resolved
index (NOT the conflict-time ours-wins tree). --abort restores
HEAD/ref/index/worktree to ORIG_HEAD and clears all state.