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?

بواسطة - Mary Evans
عدد الردود: 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

متوسط التقييمات: -
رداً على Mary Evans

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

بواسطة - Davo Smith
صورة Core developers صورة Particularly helpful Moodlers صورة Peer reviewers صورة 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.