I recently found out I could override a file from my tracking remote branch doing the next : "git checkout origin/remoteBranchName nameFile.txt". But I have some questions:
Having changes in this file not commited, executing the command does not warn about losing changes and when switching to other branch it does. Why?
I tried to override using hard reset but I think you cannot do it with one file. Why?
Thanks