Revert "remove git reset ops, may cause disaster"

This reverts commit 453ff7f80eabc0d8f6753bd5d0c8565261f77ff5.