# 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dojo.lkmx.io/git/hacer-un-3-way-merge-en-git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
