Skip to content

Instantly share code, notes, and snippets.

@danstuken
Created June 29, 2012 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danstuken/3019205 to your computer and use it in GitHub Desktop.
Save danstuken/3019205 to your computer and use it in GitHub Desktop.
Simple Powershell Drives for Git repos in a folder.
Get-ChildItem $myGitRepoPath | foreach { $rootDir = $_.FullName; $gitPath = join-path $_.FullName ".git"; $driveName = $_.BaseName.Replace('.','_'); if(test-path $gitPath){ New-PSDrive -name $driveName -psprovider FileSystem -root $rootDir } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment