"GIT"ting Checklist Plugin

"GIT"ting Checklist Plugin

by Rick Jerz -
Number of replies: 5
Picture of Particularly helpful Moodlers Picture of Testers

Hi Dave, I have been experimenting with GITting moodle and plugins.  I need your help about how to GIT Checklist.  I have come across the following method on GIT for Administrators, but I am not sure how to change these commands to GIT the latest "production" Checklist, not "experimental."  Might you be able to look at this code as suggest what I need to change to make it work (I have made some of my own changes already with my own thoughts)?  Or do you not maintain a "production" Checklist GIT location?  Thanks.  (this code is for mod_checklist)

$ cd /path/to/your/moodle/

$ cd mod

$ git clone https://github.com/davosmith/moodle-checklist.git checklist

$ cd checklist

$ git checkout -b MOODLE_30_STABLE origin/MOODLE_30_STABLE

$ git branch -d master

When I experiment, the checkout command fails.  

(If I wanted Checklist for 29, I assume that I can substitute 29 for 30, right?)

Average of ratings: -
In reply to Rick Jerz

Re: "GIT"ting Checklist Plugin

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

(Sorry Davo, I really meant to say "Davo" and not "Dave.")

In reply to Rick Jerz

Re: "GIT"ting Checklist Plugin

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm not quite clear what you are trying to do.

Take a look here:

https://github.com/davosmith/moodle-checklist/tree/master

There are 3 branches.

  • master - the latest code
  • MOODLE_19_STABLE - an old Moodle 1.9 compatible branch
  • fixed_first_column - an ancient experimental branch (that i really should delete)

If you want the latest code, use the master branch. If you want the latest version released to Moodle.org, then download it from Moodle.org (currently there is no difference between that and the master branch).


In reply to Davo Smith

Re: "GIT"ting Checklist Plugin

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Thanks Davo.

What I am trying to do is to use GIT to update my plugins instead of going to moodle.org.  But in doing this, I don't want to be GITting developmental code, I really want your last "stable" code that matches what is on moodle.org.  Does this help?

I am new to this GIT stuff, so I am still trying to figure it out, and am trying to following the directions in the Moodle GIT for Administrators documentation.

Do you like to suggest using GIT for your plugins, or do you like to suggest to people like me to just download the plugin from moodle.org?

I can GIT checklist, but when I issue "git checkout -b MOODLE_30_STABLE origin/MOODLE_30_STABLE" I get the error message "fatal: Cannot update paths and switch to branch 'MOODLE_30_STABLE' at the same time. Did you intend to checkout 'origin/MOODLE_30_STABLE' which can not be resolved as commit?"

I do not know what this means? 

In reply to Rick Jerz

Re: "GIT"ting Checklist Plugin

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I do not maintain a separate 'stable' branch for my checklist plugin.

In an ideal world, I would have time to manually test all aspects of the code every time I make some sort of a change (or employ a tester to do this), then publish a 'stable' release every time I was confident that nothing had broken.

In reality, I don't have the time (or budget) to do that, so I run the automated testing suite (which covers a large percentage of the code anyway), then push to the only maintained branch for my plugin, i.e. 'master'.

Your error message indicates that you tried to check out a branch that does not exist. There is no MOODLE_30_STABLE branch in my plugin, or MOODLE_29_STABLE branch, or any other MOODLE_x_STABLE branch (other than the, previously mentioned and unmaintained, MOODLE_19_STABLE branch).

As there are rarely any new features added to the plugin, only compatibility fixes, there is little danger of there being major breakages in the master branch (whether you consider it to be the 'development' or the 'stable' branch).

Average of ratings: Useful (1)
In reply to Davo Smith

Re: "GIT"ting Checklist Plugin

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Davo, this is what I needed to know.  Thanks again for all of your help, and a great plugin.