In Git, a fast-forward merge occurs when there is a linear path from the current branch tip to the target branch, and Git can integrate the histories by moving the current branch tip up to the target branch tip. This effectively combines the histories, since all of the commits reachable from the target branch are now available through the current one. Fast-forward merges can help keep your commit history clean and readable without erasing important information. When Git detects that a commit is about to be merged into the main branch without the main branch having been modified since the feature branch was first made, it chooses to use a fast-forward merge instead of a three-way merge. In other words, the prior value is a parent, or grandparent, or grandgrandparent, and the new value is a direct descendant of the prior value.