GIT: MOODLE_22_STABLE - How can I add this to my existing Moodle branches?

GIT: MOODLE_22_STABLE - How can I add this to my existing Moodle branches?

by Mary Evans -
Number of replies: 2

Hi,

I seem to have got stuck on updating Moodle after the recent changes.

Now I find that Moodle.git has a new branch MOODLE_22_STABLE but this is not in my GitHub/moodle.git so every effort I make to update my local branches results in an error for MOODLE_22_STABLE branch as there isn't one. So how do I go about getting this branch into my GitHub?

Do I create a local branch using...

git checkout -b MOODLE_22_STABLE

but how thene do I fetch MOODLE_22_STABLE from upstream git.Moodle.org?

Cheers

Mary

Average of ratings: -
In reply to Mary Evans

Re: GIT: MOODLE_22_STABLE - How can I add this to my existing Moodle branches?

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Mary, the first thing to do is to type 'git fetch origin' to make sure you have the latest data from Moodle git (this assumes that you have the Moodle git repo as your origin repo,  look at the config file in the .git subfolder if you want to double check).

Once that is done, type 'git branch -a' to list all known branches, both local and remote. Assuming MOODLE_22_STABLE is in the list, 'git checkout MOODLE_22_STABLE' should create the right local branch and set it to follow the remote branch. Do not checkout with the -b option, as that will create a fresh, new branch, not connected to the official MOODLE_22_STABLE branch.
In reply to Davo Smith

Re: GIT: MOODLE_22_STABLE - How can I add this to my existing Moodle branches?

by Mary Evans -

YES!!! That did it! Thanks Davo!!!

Cheers

Mary