You have not concluded your merge is a common warning that appears when using Git (or similar version‑control tools) after attempting to combine two branches. The message tells you that the merge process was interrupted, left unfinished, or simply never completed. Understanding why this happens and how to properly finish—or safely abort—the operation is essential for keeping your repository clean, avoiding orphaned commits, and maintaining a clear project history.
Introduction
In collaborative software development, merging branches is a routine task that lets teams integrate new features, bug fixes, or experimental code into a main line of development. In real terms, ”** This state prevents further commits on the current branch until the merge is either completed or explicitly discarded. When Git detects that a merge has not been concluded, it displays the alert **“you have not concluded your merge.Even so, merges can sometimes stall, leaving the repository in a transitional state. Ignoring the warning can lead to confusion, duplicate work, and a tangled commit graph.
No fluff here — just what actually works.
What “You Have Not Concluded Your Merge” Means
When you run a command like git merge feature-branch, Git creates a merge commit that combines the histories of the source and target branches. If the merge succeeds without conflicts, Git automatically creates the commit and returns you to a clean working tree Small thing, real impact. Still holds up..
If conflicts arise, Git pauses the merge and marks the conflicted files. If you never run git commit (or if the process is interrupted by a crash, accidental exit, or manual reset), Git keeps the repository in a merge‑in‑progress state. So at this point, you must resolve the conflicts, stage the changes, and then conclude the merge by running git commit. The next time you try to do anything—another merge, a push, or even a simple git status—Git reminds you that the previous merge was never finalized with the message **“you have not concluded your merge.
Common Reasons for an Unfinished Merge
- Unresolved conflicts – You stopped editing conflicted files before staging them.
- Accidental reset or checkout – Running
git reset --hardorgit checkoutwhile a merge is in progress discards the merge state. - Force‑pushing – Pushing a force‑updated branch can overwrite the ongoing merge commit.
- Script or CI interruption – Automated processes that attempt merges may be killed before they finish.
- Human error – Forgetting to run
git commitafter resolving conflicts.
Recognizing the cause helps you decide whether to finish the merge or discard it.
How to Check Merge Status
Before taking any action, verify whether you are indeed in a merge‑in‑progress state:
git status
In a normal merge, the output will show something like:
## main...feature
# Changes to be committed:
# new file: changed-file.txt
#
# Untracked files:
# conflicted-file.txt
#
# All conflicts resolved but not yet committed!
If you see the line “You have not concluded your merge.” at the top, Git is waiting for you to finish the operation.
You can also inspect the special MERGE_HEAD file:
cat .git/MERGE_HEAD
This file contains the commit hash of the branch you were trying to merge. Its presence confirms the merge state.
Steps to Complete an Unfinished Merge
-
Resolve all conflicts
- Open each conflicted file.
- Edit the file, choosing the correct version for each section.
- Use
<<<<<<<markers as guides; after editing, delete the markers and any conflict‑resolution comments.
-
Stage the resolved files
git add... -
Optional: Verify the merge
git diff --cached --name-onlyEnsure only the intended changes appear Most people skip this — try not to..
-
Commit the merge
git commit -m "Merge feature-branch into main"You can also add co‑author information or reference an issue number in the commit message.
-
Clean up
After a successful commit, Git automatically removes theMERGE_HEADfile and returns the repository to a normal state. Verify withgit statusTurns out it matters..
Steps to Abort an Unfinished Merge
If the merge no longer makes sense (e.g., the feature was abandoned), you can safely abort:
-
Discard conflict resolutions
git reset --hardThis discards all staged changes and reverts to the state before the merge started Still holds up..
-
Confirm the abort
git statusYou should see no merge‑related messages.
-
Optional: Clean up stray files
If any conflicted files were left untracked, you can remove them:git clean -fd
Aborting is preferable when the target branch has moved on and re‑merging would cause massive conflicts Less friction, more output..
Best Practices to Avoid Unfinished Merges
- Resolve conflicts promptly – Spend dedicated time to address each conflict before moving on.
- Use
git mergetool– Visual merge tools can simplify conflict resolution. - Write descriptive commit messages – Include a clear description of what was merged and why.
- Test merges in a branch – Perform a dry‑run merge (
git merge --no-commit --no-ff feature) to catch issues early. - Automate conflict handling – For simple changes, consider using
git rebase -X oursorgit rebase -X theirsto avoid manual conflict resolution. - Backup before force‑push – If you need to rewrite history, ensure you have a safe backup of the repository.
By following these habits, you reduce the likelihood of encountering the “you have not concluded your merge” warning.
Frequently Asked Questions
Q: Can I continue working on other branches while a merge is in progress?
A: Git will block most operations (including new merges) while the merge state persists. You can create a new branch, but any attempt to switch branches will abort the current merge unless you explicitly use git merge --abort.
Q: What if I accidentally reset during a merge?
A: git reset --hard will discard the merge state, effectively aborting the merge. You’ll need to re‑apply any lost changes from the target branch if they were not already merged elsewhere No workaround needed..
Q: How do I know if a merge conflict is really resolved?
A: Run git status. If the conflicted files are no longer listed under “Changes to be committed,” and there is no “You have not concluded your merge” message, the conflicts are resolved.
Q: Is it safe to force‑push after an unfinished merge?
A: Force‑pushing while a merge is in progress can corrupt history. Always complete or abort the merge before any force operation Turns out it matters..
Q: Can I revert a merge commit after it’s been concluded?
A: Yes. Use git revert <merge‑commit‑hash> to create a new commit that undoes the merge’s changes, preserving history integrity Easy to understand, harder to ignore. Worth knowing..
Conclusion
The alert “you have not concluded your merge” is Git’s
way of protecting repository integrity by ensuring that every merge operation reaches a definitive state—either fully committed or cleanly aborted. Understanding the underlying mechanics (the MERGE_HEAD, MERGE_MSG, and index lock files) empowers you to diagnose the issue quickly, resolve conflicts with confidence, and choose the appropriate recovery path, whether that’s completing the merge, aborting it, or, in rare cases, manually clearing the merge state.
Adopting the best practices outlined above—prompt conflict resolution, dry‑run merges, descriptive commit messages, and disciplined use of tooling—will keep your workflow smooth and minimize the chances of stalling mid‑merge. When the warning does appear, you now have a clear, step‑by‑step playbook to bring the repository back to a healthy state and continue delivering code without friction.