mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-08 22:10:14 +01:00
Update cd-repo.ps1
This commit is contained in:
parent
52a502cc5a
commit
6d019cb983
@ -7,8 +7,7 @@
|
|||||||
Specifies the Git repository's folder name
|
Specifies the Git repository's folder name
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./cd-repo.ps1 rust
|
PS> ./cd-repo.ps1 rust
|
||||||
📂C:\Repos\rust
|
📂C:\Repos\rust - current branch is: ## main ... origin/main
|
||||||
on branch: ## main ... origin/main
|
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
.NOTES
|
.NOTES
|
||||||
@ -38,9 +37,7 @@ try {
|
|||||||
if (-not(Test-Path "$path" -pathType Container)) { throw "The path to 📂$path doesn't exist (yet)" }
|
if (-not(Test-Path "$path" -pathType Container)) { throw "The path to 📂$path doesn't exist (yet)" }
|
||||||
$path = Resolve-Path "$path"
|
$path = Resolve-Path "$path"
|
||||||
Set-Location "$path"
|
Set-Location "$path"
|
||||||
Write-Host "📂$path"
|
Write-Host "📂$path - current branch is: " -noNewline
|
||||||
|
|
||||||
Write-Host " on branch: " -noNewline
|
|
||||||
& git status --short --branch --show-stash
|
& git status --short --branch --show-stash
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
|
Loading…
Reference in New Issue
Block a user