This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cleanbackup { | |
| Write-Host "Cleaning up for backup..." -ForegroundColor Yellow | |
| # node_modules | |
| Write-Host "Removing node_modules..." -ForegroundColor Red | |
| Get-ChildItem -Path . -Filter "node_modules" -Recurse -Directory -Force | Remove-Item -Recurse -Force | |
| # .git folders (since code is on GitHub) | |
| Write-Host "Removing .git folders..." -ForegroundColor Red | |
| Get-ChildItem -Path . -Filter ".git" -Recurse -Directory -Force -Hidden | Remove-Item -Recurse -Force |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cleanmodules { | |
| Write-Host "Searching for node_modules folders..." -ForegroundColor Yellow | |
| $folders = Get-ChildItem -Path . -Filter "node_modules" -Recurse -Directory | |
| if ($folders.Count -eq 0) { | |
| Write-Host "No node_modules folders found." -ForegroundColor Green | |
| return | |
| } | |
| Write-Host "Found $($folders.Count) node_modules folder(s). Deleting..." -ForegroundColor Red |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = git | |
| email = your_preferred@email.email | |
| [alias] | |
| ac = "!git add . && git commit -m" | |
| pom = push origin main | |
| lom = pull origin main | |
| rao = remote add origin | |
| lomauh = pull origin main --allow-unrelated-histories |