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:
git rm -r --cached .
git add .
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