Forked from vermorel/git-fetch-rebase-subdirectories.psh1
Last active
December 16, 2022 10:43
-
-
Save samiru/80a80916a1d1ebabf7b472f3aecca1b0 to your computer and use it in GitHub Desktop.
Iterate through subdirectories in PowerShell and perform 'git fetch' and 'git rebase' each time
This file contains hidden or 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
| <# | |
| Iterate through all subdirectories, and perform Git pull on each sub directory. | |
| Tags: #bin | |
| #> | |
| $initpath = Get-Location | |
| foreach($path in Get-ChildItem) { | |
| if ($path.Attributes -eq "Directory") { | |
| Set-Location $path.FullName | |
| git pull | |
| } | |
| } | |
| Set-Location $initpath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks