command line - git undo does not revert file back to its original state -


i have created new repository , had readme.md file added it. added on remote repository. cloned remote local machine , added .ignore file , staged file in master branch. later on decided wanted revert readme original state while commiting other files first staged , committed .ignore files , tried following commands undo changes readme:

git reset head readme.md

git checkout -- readme.md

when did not work tried out

git checkout head -- readme.md

git reset --hard <commit id> readme.md

git reset --hard head readme.md

git reflog readme.md

git checkout <commit id> readme.md

git checkout readme.md

none of these seem have worked. when hit command git status see following output:-

on branch master branch ahead of 'origin/master' 1 commit.   (use "git push" publish local commits) changes not staged commit:   (use "git add <file>..." update committed)   (use "git checkout -- <file>..." discard changes in working directory)          modified:   readme.md  no changes added commit (use "git add" and/or "git commit -a") 

can here? how readme file not show modified , revert state on remote server?


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -