Sunday, 17 September 2017

Remove local commits that are made in local branch

Throw away local commits in git



git reset --hard <the sha1 hash>


Example:

  $ git reset --hard cdb645b705e55985bb08f4fdb9004224414c5219

This will reset the changes back to the git commit
To see the changes Use
$ git log

No comments:

Post a Comment