1

The .gitignore is not working to keep changes in a remotely committed file intact.

I edited README.md file remotely through browser GUI, and when I do git push -f, the README.md is overwritten although:

  • .gitignore content is

    README.md
    Readme.md

What I have done:

  1. git rm -r --cached .
  2. git add .
  3. git rm --cached README.md

and finally when I do: git push -f , I end up loosing the changes made in the remote file README.md

0 Answers0