> I installed Moodle 4.1 LTS with Git last February, but I didn't really understand Git at that time. For my initial update to 4.1.2+,
So the initial 4.1 LTS was a Git repo, downloaded as documented under https://docs.moodle.org/401/en/Git_for_Administrators#Obtaining_the_code_from_Git and then upgraded to 4.1.2+ as documented under https://docs.moodle.org/401/en/Upgrading#Standard_install_package, specifically,
> How can I revert to a clean 4.1.2+ version thanks to git before proceeding with the update?
So the initial 4.1 LTS was a Git repo, downloaded as documented under https://docs.moodle.org/401/en/Git_for_Administrators#Obtaining_the_code_from_Git and then upgraded to 4.1.2+ as documented under https://docs.moodle.org/401/en/Upgrading#Standard_install_package, specifically,
- Move your old Moodle software program files to another location. Do NOT copy new files over the old files.
- Unzip or unpack the upgrade file so that all the new Moodle software program files are in the location the old files used to be in on the server.
Correct?
> How can I revert to a clean 4.1.2+ version thanks to git before proceeding with the update?
Now you want to be in the same 4.1.2+ but the code should be a Git repo again (not the unpacked zip file).
The lazy solution would be to a minor upgrade, as in 1) mode the code directory away and put a Git repo in its place as you did initially, i.e. https://docs.moodle.org/401/en/Git_for_Administrators#Obtaining_the_code_from_Git. The price you pay is, you will be on 4.1.current, which is 4.1.8 since 22 December.
Or do you have a compelling reason to be on 4.1.2+, not 4.1.8?