Git 4 Moodle – oneliner

cd yourmoodlecodedir

git log –oneline > oneliner.txt
Then we use cat with grep to look for things like:
‘weekly release 3.6’ or ‘New’.

cat oneliner.txt |grep ‘weekly release 3.6’

which renders lines like:

95abbe12ba2 weekly release 3.6.5+
61d76db67bd weekly release 3.6.4+
2f1ed943880 weekly release 3.6.3+

So to ‘roll back’ the code one could set by the first column value.
which is the Commit hash.

Wanna see all that’s new?

cat oneliner.txt |grep ‘New’

Example of a 3.6 branch and just the ‘New’ from the bottom of the listing
(there were 1580 lines matching ‘New’):

5af78ed2b20 New highlight function for searches etc
0157e3bfba6 New “highlight” class (eg for search results)
edf7fe8c19a New usergetmidnight function and use in finding today’s logs
4c86dda63ef Not needed any more … use the “News” forum instead.
600149be34b New logging format Improved “Recent Activity” on home page Better formatting. Many other small fixes.
1b1fbf172f7 New icons for courses displayed in weekly format. They collapse/unfold the display.
4d7c16adc35 New help file for uploading a picture
bb31c3db9d5 New blue theme
4adbe73bbae New icons

4 Remote Support

If needing remote support for a Moodle (Linux only), the following might need to be granted:

Info on where hosted … with what provider.
Fully qualfied domain name or external IP address,

Package leasing from provider …

a. what OS
b. shared (may not have if b or c)
c. VPS managed – provider techs do the heavy lifting.
d. VPS un-managed – you do the heavy lifting … update of OS, install of software
via yum/apt-get/other.

URL to site – got valid cert (https)

An account in the moodle:
Username: ktask
Email address: ktask@sosoftexas.org
Password: you setup … I’ll change.
Moodle account set to admin level.

ssh as root or a user with same creds as above that is made member of sudoers group on server – user can su to root

ssh port or keys?

IF you have cPanel, is there a terminal icon?
cPanel creds … if you have cPanel

cPanel URL – include port

Git for Moodle Admins

moodle git hub
possible to use any other of the public mirrors:
Bitbucket: https://bitbucket.org/moodle/moodle
HQ: git://git.moodle.org/moodle.git

 

git clone git://git.moodle.org/moodle.git [nameofdir]

git clone –depth=1 -b MOODLE_2#_STABLE –single-branch git://git.moodle.org/moodle.git [nameofdir]

can’t update/move to higher version with above.

git clone -b MOODLE_29_STABLE git://git.moodle.org/moodle.git [directory]

git clone depth 1 -b MOODLE_31_STABLE git://git.moodle.org/moodle.git [directory]

Above would be good for the series … which is long term support version.

The above works.

cd [nameofdir]
git branch -a

If you did the second command above, nothing more need be done … the branch/code already set to the 2# you gave in the command
If you did the first command above, then one has to do the following.

git branch –track MOODLE_3#_STABLE origin/MOODLE_3#_STABLE
git checkout MOODLE_3#_STABLE
or
git checkout -b MOODLE_30_STABLE origin/MOODLE_30_STABLE

** IF a side load of git won’t set to the branch desired.
in the html directory, re-issue the branch and check out commands:

git branch –track MOODLE_30_STABLE origin/MOODLE_30_STABLE
git checkout MOODLE_30_STABLE

Then issue:

git reset –hard

Check the branch
git branch -a

The * should now be on the one desired.