I am new to Git. My question is simple but I looked into this SO LINK I could find the right answer.
Step 1. Suppose I have a project with two files in it. A.txt and B.txt. I made some changes to file and eventually I pushed it to the repo.(all good till now)
Step 2. Now I made some more changes in it. Suppose I added one line in both A.txt and B.txt.
Step 3. so now I went to cmd and did "Git Status". I saw both the file name in "Red Colour".
Step 4. Then I realized that I DO NOT want these files to go to my master repo. I mean I do not want these changes at all even in my local repo.
Step 5. Also, I have forgotten which line I have added to both A.txt and B.txt since I last successful push.
Step 6. So when I do git status "I see both the files in red colour" because of one one line changes they are carrying with them. How can I revert those changes from my local repo such that when I do git status. I should not see anything at all. I should see message as "it's in sync with remote repo".
Reiterating Myself. I want a git command which will revert changes made in my local repo in such a way that after running git command when I switch back to my project I should see message as "Some external source is trying to modify file a.txt and b.txt" And If I say yes to that prompt the one one line change that I made should be gone from my local repo as if it was never there.
P.S: Kindly note that I am not at all taking about "git add or commit or push".