Skip to content

Commit 38e1b90

Browse files
committed
create a random repository for some manual testing
1 parent 8a066c6 commit 38e1b90

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Playground

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,12 @@ Git-NumberedUnhidden # alias: gunhide
144144
```powershell
145145
Publish-Module -Path .\ -NuGetApiKey key
146146
```
147+
148+
149+
## Random Repository
150+
151+
Create a repository with some random files/changes in directory `Playground`.
152+
153+
```ps1
154+
./create-random-repo.ps1
155+
```

create-random-repo.ps1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
$repoPath = "Playground"
2+
New-Item -ItemType Directory -Path $repoPath | Out-Null
3+
Push-Location $repoPath
4+
5+
git init | Out-Null
6+
7+
@(
8+
@{ Name = "README.md"; Content = "# Demo Repository`nThis is a demo repo created by PowerShell." },
9+
@{ Name = "app.txt"; Content = "Version 1.0`nHello World" },
10+
@{ Name = "config.json"; Content = '{ "version": "1.0", "enabled": true }' },
11+
@{ Name = ".gitignore"; Content = 'node_modules' },
12+
@{ Name = "HOW TO.md"; Content = 'HOW TO`n======' }
13+
) | ForEach-Object {
14+
Set-Content -Path $_.Name -Value $_.Content
15+
}
16+
17+
git add .
18+
git commit -m "Initial commit with demo files"
19+
20+
Add-Content -Path "app.txt" -Value "`nFeature added at $(Get-Date)"
21+
(Get-Content "config.json") -replace '"enabled": true', '"enabled": false' | Set-Content "config.json"
22+
Add-Content -Path "HOW TO.md" -Value "`nJust do it"
23+
24+
git add app.txt
25+
26+
Pop-Location
27+
28+
echo "Check out the mega dummy repository:"
29+
echo "cd Playground"

0 commit comments

Comments
 (0)