PowerShell_Scripts/git/Refresh-GitRepo.ps1

8 lines
256 B
PowerShell

$local:workTree = git worktree list --porcelain | Select-String worktree | ForEach-Object { $_ -split 'worktree ' } | Where-Object { $_ }
Push-Location $workTree
$null = git reset HEAD
$null = git rm --cached -r .
$null = git add .
git status
Pop-Location