From c057fd617b5ceb0693a93d7af1821d1e9d0506ae Mon Sep 17 00:00:00 2001 From: Bjarke Sporring Date: Wed, 7 Jan 2026 22:04:44 +0100 Subject: [PATCH] fix: use switch and not checkout --- 01_essentials/03-branching/setup.ps1 | 4 ++-- 01_essentials/05-merge-conflicts/setup.ps1 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/01_essentials/03-branching/setup.ps1 b/01_essentials/03-branching/setup.ps1 index 2a4c88b..6548f40 100644 --- a/01_essentials/03-branching/setup.ps1 +++ b/01_essentials/03-branching/setup.ps1 @@ -76,10 +76,10 @@ Write-Host "`n=== Setup Complete! ===" -ForegroundColor Green Write-Host "`nYour challenge environment is ready in the 'challenge/' directory." -ForegroundColor Cyan Write-Host "`nNext steps:" -ForegroundColor Cyan Write-Host " 1. cd challenge" -ForegroundColor White -Write-Host " 2. Create a new branch: git checkout -b feature-login" -ForegroundColor White +Write-Host " 2. Create a new branch: git switch -c feature-login" -ForegroundColor White Write-Host " 3. Create login.py and commit it" -ForegroundColor White Write-Host " 4. Make another commit on the feature branch" -ForegroundColor White -Write-Host " 5. Switch back to main: git checkout main" -ForegroundColor White +Write-Host " 5. Switch back to main: git switch main" -ForegroundColor White Write-Host " 6. Observe that login.py doesn't exist on main!" -ForegroundColor White Write-Host " 7. Run '..\verify.ps1' to check your solution" -ForegroundColor White Write-Host "" diff --git a/01_essentials/05-merge-conflicts/setup.ps1 b/01_essentials/05-merge-conflicts/setup.ps1 index c899ce6..a9816c0 100644 --- a/01_essentials/05-merge-conflicts/setup.ps1 +++ b/01_essentials/05-merge-conflicts/setup.ps1 @@ -60,7 +60,7 @@ git add config.json git commit -m "Add timeout configuration" | Out-Null # Switch to feature branch: Add debug setting (conflicting change) -git checkout update-config | Out-Null +git switch update-config | Out-Null $featureConfig = @" { @@ -78,7 +78,7 @@ git add config.json git commit -m "Add debug mode configuration" | Out-Null # Switch back to main branch -git checkout main | Out-Null +git switch main | Out-Null # Return to module directory Set-Location ..