This problem is already asked in this website. But still, I could not find the correct solution. one solution given, is to use-
git reset --hard origin/master
But I am not very sure how to use this if I have to do it for my single file. This seems a very basic question to me, but I am having a lot of issues. I made few changes to a file parent.java
in local because that file was extended in my file child.java
. But tomorrow, someone changes parent.java
, and now I have to use latest parent.java
in child.java
, so I find it hard to overwrite parent.java
file with the latest repository file.