Updating Moodle that installed whitout git but update with git


Maybe this question little weird, but I can’t find the good title to describe this problem.

let say my client downloaded the moodle 3.6 as zip file, they have install it and it working, latter on, they ask me to update the moodle to 3.9 for some reason.

I know moodle has the git repository, and they asked me to update it trough git, last time i checked there is no .git folder beacuse they not install it using git.

I’m trying to clone new moodle to another folder and then copy the .git folder to existing installed moodle, I’m trying to use git command and it work, but when I’m trying to use git pull command the respon allways Already up to date. and unable to update.

am I doing wrong ?
or it shouldn’t use this way ?


I’m trying to clone new moodle to another folder

You could then simply rename the original folder as _old, and rename the cloned folder as your current moodle.

If you copy only .git, since it contains the latest clone history, any pull will consider everything was already… pulled.

The alternative is to llok at the delta with:

cd /current/moodle
git --git-dir=../path/to/new/cloned/repo status

# warning: this can override files:
git --git-dir=../path/to/new/cloned/repo restore -- .

Answered By – VonC

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published