Git: Merge Errors

Wajeeh Ahsan
1 min readJan 4, 2021

--

I was trying to pull an updated branch and it got stuck with some conflicts. These conflicts were nearly impossible to resolve. You know all the way messy. So the better approach to tackle this issue was to checkout all changes, delete the branch locally, and then fetching the fresh and updated branch. So when I tried and git checkout it ended up with the following error:

error: path '***file***' is unmerged
error: path '***file***' needs a merge.

It’s worth understanding what those error messages mean — needs merge and error: you need to resolve your current index first indicate that a merge failed, and that there are conflicts in those files. If you've decided that whatever merge you were trying to do was a bad idea after all, you can put things back to normal with:

git reset --merge

However, otherwise you should resolve those merge conflicts.

--

--

Wajeeh Ahsan
Wajeeh Ahsan

No responses yet