Feature: Ability to reset challenges

Having the ability to have a personalised challenge repo reset to clone a fresh copy of the challenge thus resetting the challenge.

Currently when the timer expires and a new session is started, the git repo remains at the same head as the last push which presumably was resulted in failed tests and non-completion of the challenge. Should a user have completely messed up the codebase or just want a fresh start, this could be the easy method.

1 Like

Thanks. Noted.

Meanwhile as a workaround you can always rest to the original commit:

First find the first commit SHA: git rev-list --max-parents=0 --abbrev-commit HEAD
Then do a hard-reset to the first commit: git reset --hard <COMMIT SHA> and finally git push -f to force remote repo to follow.

The beauty of git!

If you are using VScode, this is even easier: git - Is there a way to revert to a previous commit in VS code? - Stack Overflow

BTW, when a new challenge attempt (session) is started, only new commits, commits that are pushed after start of the session, are shown and tested