Last active
October 7, 2019 08:18
-
-
Save jmrnilsson/e1e903a9841ba99420156cb1a1927f11 to your computer and use it in GitHub Desktop.
Push empty commits to git for some branches
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
#!/usr/bin/env pwsh | |
git fetch --all | |
$branches = ('branch0', | |
'branch1', | |
'branch2', | |
); | |
foreach ($branch in $branches) { | |
Write-Host "Pushing empty commit to $branch"; | |
git checkout "$branch"; | |
git commit --allow-empty -m "empty commit (start ci pr build)"; | |
git push origin "$branch"; | |
Write-Host "Done.." | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment