Minor updates with GIT

Minor updates with GIT

by Koen Vanderhoeven -
Number of replies: 5

Hi,

I was wondering how I can update Moodle with GIT. I don't want to automate major upgrades but only minor updates. How is this possible? I have seen the official Moodle GIT help concerning upgradeing Moodle with GIT but I cannot find where I can specify which updates I want to be made and which not.

Best regards,
Koen


Average of ratings: -
In reply to Koen Vanderhoeven

Re: Minor updates with GIT

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Minor upgrades are as simple as "git pull". See https://docs.moodle.org/en/Git_for_Administrators.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Minor updates with GIT

by Koen Vanderhoeven -

Thank you Visvanath. Wasn't sure if it would only install the minor updates. Will try this today.

In reply to Koen Vanderhoeven

Re: Minor updates with GIT

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It will pull updates for whatever branch you are on. So, if you originally checked out Moodle with something like

git clone -b MOODLE_35_STABLE git@github.com:moodle/moodle.git

Then...

git pull

...will fetch and merge whatever changes have been made on the 3.5 branch since you did the last clone or pull. As long as you have not made changes to core code then it will be 'fast forward' and there'll be no merge conflicts. 

I assume that this is what you mean by 'minor updates'.

Note that any non-core plugins you add will not break this (but will not update the plugins). The plugins will not be under git control which you may or may not care about. 

In reply to Howard Miller

Re: Minor updates with GIT

by Koen Vanderhoeven -

Thank you, Howard. We did not first checked out Moodle but just installed it on the server without git. It is version 3.5 and I would like to use the methode you describe above. But I'm afraid the "git clone" command will overwrite the current installation? How can I "tell" GIT that what we have installed now is branch 3.5 (so ideally linking it without (over)writing anything). Afterwards I could than use git pull. For future configurations we will immediately use git clone but for now I would like to hear what I can do to link it?