Why can't I drop a file from my working directory in Git?

I have a modified file in the Git working directory that I want to undo. In the submodule this file is not .

I tried 3 different teams and nothing helped.

  • git checkout -- <file>, or git checkout <file>

  • git reset HEAD --hard

  • git stash save --keep-index

How to delete this file?

Screenshots:

enter image description hereenter image description here

+4
source share
1 answer

While you are installing git config --global core.autocrlf true, you will see the changes automatically applied to these files.

I would recommend:

+1
source

Source: https://habr.com/ru/post/1548713/


All Articles