Jason
Jason

Reputation: 12789

How do I overwrite changes on my local copy

I ran git pull origin master and I get the following message because I have my changes in a single file. What command should I issue so that the changes are overwritten on my local copies.

Upvotes: 0

Views: 8799

Answers (2)

Rahul
Rahul

Reputation: 1876

Look at this: How do I force "git pull" to overwrite local files?

git clean
git pull

Upvotes: 2

Jorge Israel Peña
Jorge Israel Peña

Reputation: 38616

You can try checking out the file so that your changes are removed with git checkout -- foo.txt and then you'll no longer have changes so the merge should go through.

To change everything back to normal, do git reset --hard HEAD

Upvotes: 3

Related Questions