From acacd83084d6054cb823767924d0e597c88a4af7 Mon Sep 17 00:00:00 2001 From: Bjarke Sporring Date: Sun, 4 Jan 2026 15:26:12 +0100 Subject: [PATCH] feat: add reset script to module 1 --- module-01-basics/reset.ps1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 module-01-basics/reset.ps1 diff --git a/module-01-basics/reset.ps1 b/module-01-basics/reset.ps1 new file mode 100644 index 0000000..51126b0 --- /dev/null +++ b/module-01-basics/reset.ps1 @@ -0,0 +1,29 @@ +#!/usr/bin/env pwsh + +<# +.SYNOPSIS + Resets the Module 01 challenge environment. + +.DESCRIPTION + Removes the existing challenge directory and runs setup.ps1 to create a fresh challenge. + This is useful if you want to start over from scratch. +#> + +Write-Host "Resetting Module 01: Git Basics Challenge..." -ForegroundColor Cyan +Write-Host "" + +# Remove existing challenge directory if it exists +if (Test-Path "challenge") { + Write-Host "Removing existing challenge directory..." -ForegroundColor Yellow + Remove-Item -Path "challenge" -Recurse -Force + Write-Host "[SUCCESS] Challenge directory removed" -ForegroundColor Green +} else { + Write-Host "[INFO] No existing challenge directory found" -ForegroundColor Gray +} + +Write-Host "" +Write-Host "Running setup script..." -ForegroundColor Cyan +Write-Host "" + +# Run the setup script +& "$PSScriptRoot/setup.ps1"