visual studio – git is showing unmerged paths: both modified


git reflog will helps you to understand what triggered.This will produce like this

e507167f (HEAD -> beta, origin/beta) HEAD@{0}: checkout: moving from trunk to beta
8ad36515 (origin/trunk, origin/HEAD, trunk) HEAD@{1}: checkout: moving from beta to trunk
e507167f (HEAD -> beta, origin/beta) HEAD@{2}: commit: sync file removed
e84ed164 HEAD@{3}: pull: Fast-forward
53d627ed HEAD@{4}: checkout: moving from trunk to beta

both modified: file_3
This file may contains conflict markers.This is because of the merge operation.When a conflict happens,it will pause the merging and insert conflict markers into the conflicted file to highlight the areas where issue exists.To fix it,
1. Manually edit the file to keep the desired changes, remove the conflict markers (<<<<<<<, =======, >>>>>>>), and then commit the changes to finalize the merge
2.Run the following to return your branch to the state it was in before you started the merge attempt
git merge --abort

if this diaplays “mo merge” then need to hard reset
git reset --hard

NOTE: This will completely discard changes in the working directory and staging area

Leave a Reply

Your email address will not be published. Required fields are marked *