Add refresh callback.
Make gitReset support reset to a specific commit.