How to get rid of bogus changes in git?

Posted by zaza on Stack Overflow See other posts from Stack Overflow or by zaza
Published on 2010-06-11T15:59:41Z Indexed on 2010/06/11 19:52 UTC
Read the original article Hit count: 170

Filed under:
|
|
|

I'm a happy user of PortableGit 1.7.0.2. Today I wanted to pull a project changes from GitHub.com repository, so I did git pull. It failed with the following message: error: Your local changes to 'main.rb' would be overwritten by merge. Aborting.. I didn't care about the local changes so I typed git reset --hard HEAD (git clean from here didn't help neither), but it didn't work. When asked for git status I was still able to see the file as modified. git diff showed me that each line of the file has been modified, while git diff -b showed no differences at all, so I guess this is a line ending issue. Which is strange because the code is only pushed from Windows machines.

Anyway, the question is: how can I ignore the local, bogus changes and merge with the latest changes from the remote repository?

© Stack Overflow or respective owner

Related posts about git

Related posts about version-control