Git commands to uncommit, un stage changes and remove the changes

I checkout between multiple local repo, since I work on multiple projects. Before every check out I need to commit, which means I’m unable to keep my last commit msg same as that on git cloud repo. I need some help.

Git commands :

  1. revert or uncommit last changes but keep in staged area
  2. Move changes from staged to unstaged area
  3. Delete/remove unstaged changes

>Solution :

To the point,
commands for you:

  1. git reset –soft HEAD~1
  2. git reset
  3. git checkout .

Leave a Reply