Note - I am new to understanding the git reset command, so I am not sure if it is the right command for what I want to do, which is very simple.
I wanted to undo the changes made in the last git push. So, I ran the following reset command to go back to the desired commit hash (one before the undesired commit hash)-
git reset <last desired commit hash> <file name>
After this, there were no changes to file as such (working directory). But, git status
showed that the file had been modified.
modified: <filename>
On doing git stash
now, the working directory file was modified. But, I do not see an option to push the changes to remote repository. Git pull also shows no changes.