2015-10-22 08:31:52 +01:00
|
|
|
# git merge
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
> Merge branches.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://git-scm.com/docs/git-merge>.
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2019-12-17 20:35:16 +00:00
|
|
|
- Merge a branch into your current branch:
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2016-09-21 16:35:46 +01:00
|
|
|
`git merge {{branch_name}}`
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2016-01-07 17:31:27 +00:00
|
|
|
- Edit the merge message:
|
2014-03-09 12:20:13 +00:00
|
|
|
|
2023-05-19 05:03:57 +01:00
|
|
|
`git merge --edit {{branch_name}}`
|
2018-04-03 00:59:41 +01:00
|
|
|
|
|
|
|
- Merge a branch and create a merge commit:
|
|
|
|
|
|
|
|
`git merge --no-ff {{branch_name}}`
|
2018-07-18 22:05:38 +01:00
|
|
|
|
2018-07-19 08:57:28 +01:00
|
|
|
- Abort a merge in case of conflicts:
|
2018-07-18 22:05:38 +01:00
|
|
|
|
|
|
|
`git merge --abort`
|
2023-05-19 05:03:57 +01:00
|
|
|
|
|
|
|
- Merge using a specific strategy:
|
|
|
|
|
|
|
|
`git merge --strategy {{strategy}} --strategy-option {{strategy_option}} {{branch_name}}`
|