My issue is I have changed a file eg: README, added a new line \'this for my testing line\' and saved the file, then I issued the following commands
gi
Use below command:
$ git reset HEAD~1
After this you also able to view files what revert back like below response.
Unstaged changes after reset: M application/config/config.php M application/config/database.php