t6024: move "git reset" to prepare for a test inside the test itself