Minor Update Using Git Command from 3.3 to 3.3.1

Minor Update Using Git Command from 3.3 to 3.3.1

by John Nguyen -
Number of replies: 5

I follow the instruction for update for moodle 3.3 to 3.3.1

First: cd /path/to/your/moodle/ 

Second: sudo git pull

I got a message asking me to commit or  stash ,  I  did "sudo git commit" and alot of files are modified, notification in red,


I went back to the site and check the notification, but it is still show me the older version. Please help me, and thank you in advance. I am trying to set up moodle for my classes. 


Than you in advance. 


Average of ratings: -
In reply to John Nguyen

Re: Minor Update Using Git Command from 3.3 to 3.3.1

by Ken Task -
Picture of Particularly helpful Moodlers

First, make a backup of code directory and get an SQL dump of the database.

Think there was an update released just today, so you might want to try it again.

What does:

fgrep '$release' version.php

show?

Just this evening:

[root@sos 33test]# fgrep '$release' version.php
$release  = '3.3.1 (Build: 20170710)'; // Human-friendly version name

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Minor Update Using Git Command from 3.3 to 3.3.1

by John Nguyen -

Thank you Ken. 

I try to understand the steps to update using git using this two steps

$ cd /path/to/your/moodle/ 

$ git pull

I run sudo git pull, I long list and I screen shot the bottom part below:




Then, I run "sudo git commit" and see a lot of modified file.


But, I check my Notifications. It's still showing that I have an older version and still need to update. 


Thanks


In reply to John Nguyen

Re: Minor Update Using Git Command from 3.3 to 3.3.1

by Ken Task -
Picture of Particularly helpful Moodlers

IF you have a backup as suggested before, try this:

cd /path/to/moodle/code/

git branch -a

IS the tracked branch * on the moodle 33 line?

Then issue:

git branch --track MOODLE_33_STABLE origin/MOODLE_33_STABLE

That will probably tell you it's already tracking ... that's ok, just making sure ... but issue the command anyway.

Then:

git checkout MOODLE_33_STABLE

make sure you do both commands.

Then:

git reset --hard

Then try the git pull again.

To check version ... fgrep '$release' version.php

May as well finish the update ... via command line:

php admin/cli/maintenance.php --enable

php admin/cli/upgrade.php

php admin/cli/maintenance.php --disable

Since you might be executing commands as root, chown all the files/folders in /moodlecode/ to that of the web server user.

chown apache:apache * -R

or on Ubuntu

chown www-data:www-data * -R

'spirit of sharing', Ken



Average of ratings: Useful (1)
In reply to Ken Task

Re: Minor Update Using Git Command from 3.3 to 3.3.1

by John Nguyen -

Thank you so much. I wish I could give you a hug. You are awesome. I would love to donate you $10 via paypal for coffee, if you would like. smileThank you so much. 

In reply to John Nguyen

Re: Minor Update Using Git Command from 3.3 to 3.3.1

by Ken Task -
Picture of Particularly helpful Moodlers

So from your response, shall assume that worked! ;)

'Awesomeness' is relative. ;)

Hugs and donation for coffee not really expected, but thanks for the thought.

'spirit of sharing', Ken