Talk:Maintaining Moodle customisations with Git
From MoodleDocs
Merging into master is a bad idea!
Re:
- Switch back to the master branch and merge the changes
git checkout master git merge myfeature
- Any future development can take place on the myfeature branch, and be merged into master in this way
Ouch! this bit is a really bad idea. I don't know what you are trying to achieve, but this is not the right way to do it!!!--Tim Hunt 09:09, 15 March 2011 (UTC)
- Please edit it to the right way to do it then, it hasn't caused me any problems (yet) :-)Mark Johnson
- Well, I would, but as I say: "I don't know what you are trying to achieve".
- Taking a guess, what you are trying to do is have a branch that you can release onto your live severs with all the latest moodle.org features, and your myfeature, myfeature2, ... branches.
- And, my only objection is that you are using the master branch for this. I think you should keep the master branch exactly tracking the master branch from moodle.org. You should make a separate mycustommoodle branch to track the version you are releasing. That branch should be made by merging master == moodle/master and all your myfeature branches. At the OU, we call the 'mycustommoodle' branch ouvle.--Tim Hunt 10:36, 15 March 2011 (UTC)
- Would this be a case where using 'git pull', then 'git rebase master' (on the custom branch) would be the best way to go? --David Smith 2 10:58, 15 March 2011 (UTC)
- You guessed right with your assumption of my desired goal. I've never found it a problem not having a local branch that's not a clean master (I actually call mine dev, but that's by the by), if I did need one I could just create a new branch tracking origin/master? However I see your point as it's probably not "best practice", so I'll amend the page to add an instruction to create a mycustomoodle branch and merge changes into that. --Mark Johnson 11:25, 15 March 2011 (UTC)