For test purpose, I have created two files respectively, "admin/1.txt" and "user/2.txt", my command flow is as below:
git add admin/*
git commit -m "first commit"
git add user/*
git commit -m "second commit"
This local commit process could happen multiple times. But after that, I need to rollback all these local-committed-yet-not-pushed files back to there start state (untracked or modified), how could I do that in one line of command? I've tried git reset HEAD~1
, but it only rollback 1 step, not all local commitments. Any ideas? Thanks.