Guest User

Untitled

a guest
Jul 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. # This basically creates a fork-bomb where each forked process is splitting out one top-level folder
  2. Get-ChildItem -Directory | Foreach-Object {
  3. $FolderName = """$($_.Name)"""
  4. $BranchName = $_.Name -Replace(' ','-')
  5.  
  6. $Command = "git subtree split -P $FolderName -b $BranchName"
  7. Write-Host $Command
  8. $scriptBlock = [Scriptblock]::Create($Command)
  9. Start-Job -InitializationScript ([scriptblock]::Create("Set-Location $PWD")) -Scriptblock $scriptBlock
  10. }
Add Comment
Please, Sign In to add comment