> 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/do-a-3-way-merge-in-git.md).

# Do a 3-way merge in git

The next example requires a 3-way merge because `main` progresses while the feature is in-progress. This is a common scenario for large features or when several developers are working on a project simultaneously.

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

## Reference Links

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