How to abort merge on GitHub

GitHub is a widely-used platform widely that enables multiple collaborators to work on a particular task.

A merge is required to save progress on GitHub. However, sometimes, the merge will need to be stopped or delayed due to conflicts that can not be easily resolved or other reasons.

In such cases, the Git CLI helps users.

svg viewer

Solution

  1. Open the Command-Line Interface (CLI).
  2. Check to see if all the processes have completed.
  3. Type the following:

git merge --abort

This should successfully return the code to the state before the merge started. You can then make the relevant changes and merge them again.

Copyright ©2024 Educative, Inc. All rights reserved