Update cd-repo.ps1

This commit is contained in:
Markus Fleschutz 2024-07-31 10:27:29 +02:00
parent 52a502cc5a
commit 6d019cb983

View File

@ -7,8 +7,7 @@
Specifies the Git repository's folder name
.EXAMPLE
PS> ./cd-repo.ps1 rust
📂C:\Repos\rust
on branch: ## main ... origin/main
📂C:\Repos\rust - current branch is: ## main ... origin/main
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
@ -38,9 +37,7 @@ try {
if (-not(Test-Path "$path" -pathType Container)) { throw "The path to 📂$path doesn't exist (yet)" }
$path = Resolve-Path "$path"
Set-Location "$path"
Write-Host "📂$path"
Write-Host " on branch: " -noNewline
Write-Host "📂$path - current branch is: " -noNewline
& git status --short --branch --show-stash
exit 0 # success
} catch {