Vikram Anand Bhushan
Vikram Anand Bhushan

Reputation: 4896

How to get past the "Can't pull because it has unmerged file" error message?

I tried to do:

git pull origin master 

It downloaded the files from another repository, now I realized the origin was named as origin1 for my actual repository .

git pull origin1 master

But now I am getting

can't pull because it has unmerged file.

Is there a way I can fix this ?

Upvotes: 2

Views: 43

Answers (1)

VonC
VonC

Reputation: 1327004

If you don't have any work in progress, you can do:

git fetch origin1
git reset --hard origin1/master

Warning: that will remove any untracked file.

Upvotes: 4

Related Questions