HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git merge — Merge branches. More information: <https://git-scm.com/docs/git-merge>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
httpscommandclibranchesinformationmergegit mergemore

Problem

How to use the git merge command: Merge branches. More information: <https://git-scm.com/docs/git-merge>.

Solution

git merge — Merge branches. More information: <https://git-scm.com/docs/git-merge>.

Merge a branch into your current branch:
git merge {{branch_name}}


Edit the merge message:
git merge {{[-e|--edit]}} {{branch_name}}


Merge a branch and create a merge commit:
git merge --no-ff {{branch_name}}


Abort a merge in case of conflicts:
git merge --abort


Merge using a specific strategy:
git merge {{[-s|--strategy]}} {{strategy}} {{[-X|--strategy-option]}} {{strategy_option}} {{branch_name}}

Code Snippets

Merge a branch into your current branch

git merge {{branch_name}}

Edit the merge message

git merge {{[-e|--edit]}} {{branch_name}}

Merge a branch and create a merge commit

git merge --no-ff {{branch_name}}

Abort a merge in case of conflicts

git merge --abort

Merge using a specific strategy

git merge {{[-s|--strategy]}} {{strategy}} {{[-X|--strategy-option]}} {{strategy_option}} {{branch_name}}

Context

tldr-pages: common/git merge

Revisions (0)

No revisions yet.