Hi@MD,
Reset command can be used to undo changes at different levels. Modifiers like --hard, --soft, and --mixed can be used to decide the degree to which to reset. You can use the below command to perform the same.
$ git reset <modifier> <commit id>