From 6d019cb9838829fb062a14a525d5de0f972d9ef3 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz <markus.fleschutz@atcsim.de> Date: Wed, 31 Jul 2024 10:27:29 +0200 Subject: [PATCH] Update cd-repo.ps1 --- scripts/cd-repo.ps1 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/cd-repo.ps1 b/scripts/cd-repo.ps1 index 7bbc2fd3..771c9fcf 100755 --- a/scripts/cd-repo.ps1 +++ b/scripts/cd-repo.ps1 @@ -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 {