> 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-fast-forward-merge-in-git.md).

# Do a Fast Forward merge in git

The code below creates a new branch, adds two commits to it, then integrates it into the main line with a fast-forward merge.

```

# 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"
# Merge in the new-feature branch
git checkout main
git merge new-feature
git branch -d new-feature
```

## Reference Links

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