I've previously had Moodle 2.7 running on Bluehost shared hosting, but I just got my own server setup today with Ubuntu Server. I have physical access to it as well as SSH access. I've got Moodle set up according to the step-by-step instructions (https://docs.moodle.org/27/en/Step-by-step_Installation_Guide_for_Ubuntu), but I'm confused about one point about the git repository and the live site.
Just like the instructions, I've put a git reposity in /opt/, and I've got the live site in /var/www/html. I want to install some themes and plugins, but I'm curious as to the specific procedures for installing them and updating Moodle, because of this section (https://docs.moodle.org/27/en/Step-by-step_Installation_Guide_for_Ubuntu#Step_5:_Copy_local_repository_to_.2Fvar.2Fwww.2Fhtml.2F) about copying the local repository to the live site, and includes the explanation.
I understand how it works - I use git to update the repository, then I copy the new files over to the live site. But how about themes and plugins? The way I read the explanation, I should copy a theme, let's say Essential, to the repository. Then I edit the /opt/moodle/.git/info/exclude file and add the line
Then I can either copy the repository over to the live site again, or I can download the theme to the live site. Either way, the exclude will make sure that the /theme/essential folder isn't erased/removed during a git pull, right?
So, ideally, I should download all necessary themes and plugins, put them in the repository, write the excludes, and then update the repository and copy it over to the live site. Do I have that right, or am I all messed up?