diff --git a/docs/guides/git/index.md b/docs/guides/git/index.md index d042327cf..5db8e629b 100644 --- a/docs/guides/git/index.md +++ b/docs/guides/git/index.md @@ -127,8 +127,8 @@ The following commands can be used to keep the your forked Moodle branches at yo ``` #!/bin/bash git fetch upstream -for BRANCH in MOODLE_{19..39}_STABLE MOODLE_{310..311}_STABLE MOODLE_{400..405}_STABLE main; do - git push origin refs/remotes/upstream/$BRANCH:refs/heads/$BRANCH +for BRANCH in main `git branch --list 'MOODLE_*_STABLE'` main; do + git push origin refs/remotes/upstream/${BRANCH}:refs/heads/${BRANCH} done ```