> 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/git/hacer-un-3-way-merge-en-git.md).

# Hacer un 3-way merge en git

El siguiente ejemplo es muy similar, pero requiere una combinación de 3 vías porque `main` progresa mientras la característica está en progreso. Este es un escenario común para funciones grandes o cuando varios desarrolladores están trabajando en un proyecto simultáneamente.

```
Start a new feature
git checkout -b new-feature main
# Edit some files
git add <file>
git commit -m "Start a feature"
# Edit some files
git add <file>
git commit -m "Finish a feature"
# Develop the main branch
git checkout main
# Edit some files
git add <file>
git commit -m "Make some super-stable changes to main"
# Merge in the new-feature branch
git merge new-feature
git branch -d new-feature
```

## Enlaces de referencia

* <https://www.atlassian.com/git/tutorials/using-branches/git-merge>
