Created
February 18, 2026 05:41
-
-
Save joncode/64b8162e33e720dbe8d075b26e500bcc to your computer and use it in GitHub Desktop.
Quick bash script to make upstream branches for a dev/qa/prod codebase
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
| git branch dev main && git push -u origin dev | |
| git branch jg main && git push -u origin jg | |
| git branch qa main && git push -u origin qa | |
| git branch prod main && git push -u origin prod |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
commit=$(git rev-parse HEAD) && for b in dev qa prod main; do git checkout $b && git merge $commit --no-edit && git push origin $b || echo "⚠️ Skipping $b"; done && git checkout -