Saturday 7 January 2017

Moodle: Download exact commit from git

Hello,

If you want to manage a source code from Moodle of a specific commit, you need to do:

  • Install git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
  • Find the commit to download in https://github.com/moodle/moodle . In my case I found this: https://github.com/moodle/moodle/commit/89117976b8afd75c588b8b3908f763aab2edfb6a#diff-5bbd3ccd25214f9956eea7e9f714bc08
  • Download the Moodle code: git clone https://github.com/moodle/moodle.git my_moodle
  • Copy the ID of the commit: 89117976b8afd75c588b8b3908f763aab2edfb6a
  • Checkout the commit:
    • cd my_moodle
    • git checkout 89117976b8afd75c588b8b3908f763aab2edfb6a

Best regards! 

No comments:

Post a Comment