refactor: create the answers.md
This commit is contained in:
@@ -183,6 +183,56 @@ Set-Content -Path "app.py" -Value $appContent
|
||||
git add .
|
||||
git commit -m "Add user profile feature" | Out-Null
|
||||
|
||||
# Create answers.md template
|
||||
Write-Host "Creating answers.md template..." -ForegroundColor Green
|
||||
$answersTemplate = @"
|
||||
# Git History Exploration - Answers
|
||||
|
||||
Answer the following questions by exploring the Git repository history.
|
||||
|
||||
## Question 1: How many commits are in the repository?
|
||||
|
||||
**Your Answer:**
|
||||
|
||||
<!-- Write your answer here -->
|
||||
|
||||
|
||||
## Question 2: What was the commit message for the third commit?
|
||||
|
||||
(Counting from the first/oldest commit)
|
||||
|
||||
**Your Answer:**
|
||||
|
||||
<!-- Write your answer here -->
|
||||
|
||||
|
||||
## Question 3: Which file was modified in the "Fix authentication bug" commit?
|
||||
|
||||
**Your Answer:**
|
||||
|
||||
<!-- Write your answer here -->
|
||||
|
||||
|
||||
## Question 4: What changes were made to app.py between the first and last commits?
|
||||
|
||||
Briefly describe the main changes you observe.
|
||||
|
||||
**Your Answer:**
|
||||
|
||||
<!-- Write your answer here -->
|
||||
|
||||
|
||||
---
|
||||
|
||||
**Hints:**
|
||||
- Use `git log` or `git log --oneline` to view commit history
|
||||
- Use `git log --stat` to see which files were changed in each commit
|
||||
- Use `git show <commit-hash>` to view details of a specific commit
|
||||
- Use `git diff <commit1> <commit2> <file>` to compare changes between commits
|
||||
"@
|
||||
|
||||
Set-Content -Path "answers.md" -Value $answersTemplate
|
||||
|
||||
# Return to module directory
|
||||
Set-Location ..
|
||||
|
||||
@@ -190,7 +240,8 @@ 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. Explore the commit history using 'git log'" -ForegroundColor White
|
||||
Write-Host " 3. Answer the questions in README.md by creating 'answers.txt'" -ForegroundColor White
|
||||
Write-Host " 4. Run '..\verify.ps1' to check your answers" -ForegroundColor White
|
||||
Write-Host " 2. Open 'answers.md' to see the questions" -ForegroundColor White
|
||||
Write-Host " 3. Explore the commit history using 'git log'" -ForegroundColor White
|
||||
Write-Host " 4. Fill in your answers in 'answers.md'" -ForegroundColor White
|
||||
Write-Host " 5. Run '..\verify.ps1' to check your answers" -ForegroundColor White
|
||||
Write-Host ""
|
||||
|
||||
Reference in New Issue
Block a user