Git · Branches and integration

git merge --abort

Cancels an in-progress merge and returns to the pre-merge state.

Syntax
git merge --abort

Example

Example
git merge --abort

More in this group

git branch git checkout git cherry-pick git merge git switch git worktree Merge conflict markers

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course