Using Git to Update Moodle

Using Git to Update Moodle

by Jarrod Whitley -
Number of replies: 13

As the web developer I've been tasked with using Git to perform all future updates for our website. I know a little about using Terminal (OSX), but not a ton.

I know I need to follow the instructions here, but I don't know how to do that on my server (Bluehost). Now, I'M LOST.

I have no idea what to do next. I don't understand how Git it going to connect to our Moodle site and perform the updates. I'm having a hard time finding anything online to explain this process to me. I would REALLY appreciate some help.

Thanks in advance!

 

 

Average of ratings: -
In reply to Jarrod Whitley

Re: Using Git to Update Moodle

by Miguel Santos -

Hi Jarrod,

  I am assuming you have installed git on your server - https://help.github.com/articles/set-up-git

   Once you have git set up you can follow the instructions here to checkout the branch/tag of moodle you want http://docs.moodle.org/26/en/Installing_Moodle

   Essentially what you will end up with is a checkout of a branch/tag from the moodle git repository on your web server.  When you then need to do updates you can log into your server, change directories to the checkout, and do a "git pull" to download the latest code from whatever branch/tag you desire.

 

In reply to Miguel Santos

Re: Using Git to Update Moodle

by Jarrod Whitley -

I've managed to connect to my server through SSH (Terminal OSX), but I'm stuck there. I'm following the instructions listed here, but I'm stuck. You'll see in the image below the error I'm getting.

Attachment Screen Shot 2014-02-20 at 4.22.08 PM.png
In reply to Jarrod Whitley

Re: Using Git to Update Moodle

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I suspect there is a firewall in the way, blocking the connection. Try

git clone https://github.com/moodle/moodle.git

instead.

In reply to Tim Hunt

Re: Using Git to Update Moodle

by Jarrod Whitley -

Hmmm. I'm afraid I'm getting the same error.

In reply to Jarrod Whitley

Re: Using Git to Update Moodle

by Miguel Santos -

test to see if you can even reach the server on the git port and https port

telnet github.com 9418

telnet github.com 443

If you cannot connect then you may have to have those ports opened.

In reply to Jarrod Whitley

Re: Using Git to Update Moodle

by Jarrod Whitley -

WHOO! I found the answer here. It was a firewall after all I guess.

 Cloning through HTTPS was the answer. Yay!

 

Now I'm a bit hung up on one last thing. I have to find the directory path to my Moodle per the instructions listed here. How do I do that?

Attachment Screen Shot 2014-02-21 at 4.33.51 PM.png
In reply to Jarrod Whitley

Re: Using Git to Update Moodle

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Where did you type the clone command?

It will be there, or a subdirectory of there.

In reply to Jarrod Whitley

Re: Using Git to Update Moodle

by Miguel Santos -

Hi Jarrod,

The /path/to/your/moodle just means to go to the location on your server that you ran the clone.

So if you ran the clone when your prompt was at

/var/www/$ git clone .....

then you would have a moodle directory at /var/www/moodle