I would like to try and improve the documentation here:
There are lots of discussions between developers of how to use git (which logically focus on local code changes and including these in branches). However, I want to deal with a typical school/company Moodle Administrator (likely a semi-technical person), who wants to a) Install Moodle via git, b) Install one or two plugins, and c) Keep Moodle and plugins up-to-date.
Following the instructions on Git_for_Administrators (Iḿ working on a new 2.5 install) there seem to be some inaccuracies? Note: The example given is adding the Book module. This is out-of-date anyway now the Book mod is in core, so perhaps we should change this to something else?!
$ cd /path/to/your/moodle/ $ cd mod (1) $ git clone git://github.com/skodak/moodle-mod_book.git book (2) $ cd book $ git checkout -b MOODLE_22_STABLE origin/MOODLE_22_STABLE (3) $ git branch -d master (4)
Note: 2: Instructions below this say ¨The command (3) creates a new local branch that will track the remote branch with a Book version for Moodle 2.1." In this case I think this should say 2.2.
Also, working through this example (but adding a non standard Theme), adapted from the above example, I emcountered an error:
$ cd /var/www/themes $ cd themes $ git clone git://github.com/freshbreeze/Moodle_Themes_Simple_2.4.git simple (Note: this 2.4 Theme also works with 2.5) $ cd simple $ git checkout -b MOODLE_25_STABLE origin/MOODLE_25_STABLE $ git branch -d master
When issuing the second to last line it produces the following error:
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/MOODLE_25_STABLE' which can not be resolved as commit?
OK, so now Iḿ confused because I didnt think I was switching branches?
So, anyone able to help with advice here (Iḿ still new to git really), and also contribute towards improving documentation for a typical Moodle Admin that is correct, up-to-date, and useful ?