Created
September 10, 2015 02:05
-
-
Save wahidshalaly/610d3fd54ce2dbc36fd8 to your computer and use it in GitHub Desktop.
This file contains 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
# Gitin & Gitout Workarounds | |
$activeRepo = ".git" | |
$inactiveRepo = "project.git" | |
Function Rename-GitRepositoryToStart | |
{ | |
$curPath = Join-Path $(Get-Location) $inactiveRepo | |
$newPath = Join-Path $(Get-Location) $activeRepo | |
If (Test-Path -Path $curPath) | |
{ | |
Rename-Item -Path $curPath -NewName $newPath | |
} | |
} | |
Function Rename-GitRepositoryToStop | |
{ | |
$curPath = Join-Path $(Get-Location) $activeRepo | |
$newPath = Join-Path $(Get-Location) $inactiveRepo | |
If (Test-Path -Path $curPath) | |
{ | |
Rename-Item -Path $curPath -NewName $newPath | |
} | |
} | |
Set-Alias gitin Rename-GitRepositoryToStart | |
Set-Alias gitout Rename-GitRepositoryToStop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment