# Git Chain Merge Options Comprehensive reference for `git chain merge` command options, strategies, and reporting. ## How Merge Works Git chain merge updates each branch by merging the parent branch into it: 1. Checks out each branch in chain order 2. Merges the parent branch into it 3. Creates merge commits (unless fast-forward is possible) Unlike rebase, merge preserves the original commit history. ## Basic Options ### --verbose, -v Provides detailed output during the merging process. ```bash git chain merge --verbose ``` Shows exactly what's happening with each branch, including Git's merge output. ### --ignore-root, -i Skips merging the root branch into the first chain branch. ```bash git chain merge --ignore-root ``` **Use when:** - Only want to propagate changes between chain branches - Root branch has changes you don't want incorporated yet ### --stay Don't return to the original branch after merging. ```bash git chain merge --stay ``` By default, git-chain returns you to your starting branch. Use this flag to remain on the last merged branch. ### --chain= Operate on a specific chain other than the current one. ```bash git chain merge --chain=feature-x ``` Allows merging a chain even when not on a branch that belongs to it. ## Merge Behavior Controls ### --simple, -s Use simple merge mode without advanced detection. ```bash git chain merge --simple ``` Disables fork-point detection and squashed merge handling for a faster, simpler merge process. ### --fork-point, -f Use Git's fork-point detection (default behavior). ```bash git chain merge --fork-point ``` Explicitly enables fork-point detection for finding better merge bases. ### --no-fork-point Disable fork-point detection, use regular merge-base. ```bash git chain merge --no-fork-point ``` Can be faster but potentially less accurate. Useful for repositories with limited reflog history. ### --squashed-merge= How to handle branches that appear squash-merged. ```bash # Reset branch to match parent (default) git chain merge --squashed-merge=reset # Skip branches that appear squashed git chain merge --squashed-merge=skip # Force merge despite detection git chain merge --squashed-merge=merge ``` ## Git Merge Options ### Fast-Forward Behavior ```bash # Allow fast-forward if possible (default) git chain merge --ff # Always create a merge commit git chain merge --no-ff # Only allow fast-forward merges (fail if real merge needed) git chain merge --ff-only ``` ### --squash Create a single commit instead of a merge commit. ```bash git chain merge --squash ``` Combines all changes from the source branch into a single commit. ### --strategy= Use a specific Git merge strategy. ```bash git chain merge --strategy=recursive git chain merge --strategy=ours git chain merge --strategy=resolve ``` Available strategies: - `recursive` (default) - 3-way merge - `resolve` - 3-way merge with fewer renames - `ours` - Keep our version for all conflicts - `octopus` - For merging more than two heads ### --strategy-option=