> For the complete documentation index, see [llms.txt](https://dojo.lkmx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dojo.lkmx.io/ingles/git-graph/merge-branch.md).

# Merge branch

## For terminal

having the branches ready for the merge, we write the following command being in the branch that we want to merge the branch with the changes.

```bash
    git merge --no-ff <test-brach-name>
```

if there were no conflicts, apply the following command

```bash
    git push
```

> check in the branch that merged the changes if the changes are found.

## For VS code.

having the branches ready for the merge, we write the following command being in the branch that we want to merge the branch with the changes.

We go to the 3 points and then follow the next path.

Branch -> merge branch

![An image](https://668570535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmYA5iGolX5rM6z3s5ZS6%2Fuploads%2FiitwOVJRxcTLjJrbZ97Y%2Fmerge%201?alt=media)

a modal will open and we choose the branch that we are going to merge.

![An image](https://668570535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmYA5iGolX5rM6z3s5ZS6%2Fuploads%2FANL0Xqe6wzyQo6FXprjc%2Fmerge%202?alt=media)

Once we click on the branch name, the merge will be done.

If it does not mark conflicts, it only remains to press the button 'Sync Changes'.

![An image](https://668570535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmYA5iGolX5rM6z3s5ZS6%2Fuploads%2FBxr2la23TjZ9RFX9XxvZ%2Fmerge%203?alt=media).

Check in the branch that merged the changes if the changes are found.

## Merge with git graph

Open your **Git Graph** and change to the branch you want to merge to. Here we are in the dev-branch:

![](https://668570535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmYA5iGolX5rM6z3s5ZS6%2Fuploads%2F23PzQJm82VfZsydu2DSm%2Fgitgraph?alt=media)

Select the branch you want to merge and click-right.

![](https://668570535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmYA5iGolX5rM6z3s5ZS6%2Fuploads%2FDlpSowxnWMb93aAJHJXc%2Fselect%20merge?alt=media)

Select **Merge into current branch** and accept merge.

![](https://668570535-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmYA5iGolX5rM6z3s5ZS6%2Fuploads%2FUIA0EGhCWeuong3WN58z%2Fmerge?alt=media)
