Files
git-workshop/01-essentials/06-revert/reset.ps1
Bjarke Sporring 575e083f33 refactor: rewrite the merge-revert section
It is an advanced and difficult revert to accomplish and should probably
be done through a reset instead, which means that we're modifying
history which is dangerous and so should be handled by someone who
understands these dangers.
2026-01-15 16:11:24 +01:00

25 lines
841 B
PowerShell

#!/usr/bin/env pwsh
<#
.SYNOPSIS
Resets the Module 06 challenge environment to start fresh.
.DESCRIPTION
This script removes the challenge directory and re-runs setup.ps1
to create a fresh challenge environment.
#>
Write-Host "`n=== Resetting Module 06: Git Revert Challenge ===" -ForegroundColor Cyan
# Check if challenge directory exists
if (Test-Path "challenge") {
Write-Host "Removing existing challenge directory..." -ForegroundColor Yellow
Remove-Item -Recurse -Force "challenge"
Write-Host "[OK] Challenge directory removed" -ForegroundColor Green
} else {
Write-Host "[INFO] No existing challenge directory found" -ForegroundColor Yellow
}
# Run setup to create fresh environment
Write-Host "`nRunning setup to create fresh challenge environment..." -ForegroundColor Cyan
& "$PSScriptRoot/setup.ps1"