git-merge
Join development histories together
TLDR
Merge branch into current
SYNOPSIS
git merge [options] [commit]
DESCRIPTION
git merge joins two or more development histories together. It combines the specified branch and its history into the current branch, creating a merge commit when the histories have diverged.
Fast-forward merges simply move the branch pointer forward without creating a merge commit. The `--no-ff` flag forces a merge commit even when fast-forward is possible, preserving branch topology. Squash merges (`--squash`) combine all changes into a single staged changeset without creating a merge commit.
PARAMETERS
COMMIT
Branch or commit to merge.--no-ff
Always create merge commit.--ff-only
Only fast-forward merge.--squash
Squash commits into one.-m MESSAGE
Merge commit message.--abort
Abort current merge.--continue
Continue after conflict resolution.-s STRATEGY
Merge strategy.--help
Display help information.
CAVEATS
Conflicts require manual resolution. Fast-forward may hide branch history. Merge commits can complicate history.
HISTORY
git merge is a core Git command from initial release, implementing the branch combination essential to git's distributed workflow.
SEE ALSO
git-rebase(1), git-cherry-pick(1), git-mergetool(1)
