The procedure to remove a change that has been already committed but not pushed to the remote is easy and requires just a single git command to be executed in your terminal.
All you have to do is to type:
git reset HEAD~1This will reset your state to the previous commit, turning changes you want to remove into staged ones. You can remove them by doing hard reset.
After this your should end up with clean state - git status should output:
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree cleanYou're done.
 
                    