Provide a fallback to reset the git repository

re #6176