I did following, all while on my local BranchA
:
- Modify
FileA
(by mistake) git add FileA
git commit -m "Modified FileA"
So, FileA
is in my local commit (never pushed to remote) on my local branch BranchA
(also never pushed to remote).
How do I revert changes to FileA?
UPDATE AND HOW I SOLVED IT
I undoed changes to FileA from SourceTree instead from git as I realized it is simpler for me.
To do so, in SourceTree, r-c on commited file FileA > "Log Select ..." > select the previous commit (the one before yours) > r-c on it and choose "Reset to this commit". That did the job but thank you all