GIT for dummies

GIT for dummies

by Mary Cooch -
Number of replies: 82
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Last Friday  sat with Mary Evans while she helped me set up a WAMP server and a Github account and get me the latest 2.4 dev -which was great. However, it's one thing to nod appreciatively while someone else types the code into that black box and another to attempt to do it on your own...

My plan is to have a 2.3 and a 2.2 via GIT as well as the dev so I am always totally up to date. I thought I would try to set up a 2.3.1 today. I made the database on my Wamp server and I made a folder for  this new Moodle to go into . Now I realise I have forgotten Mary's instructions for getting Moodle from Github...

It's an interesting experience because I have spent a hugely frustrating hour totally lost experimenting with various settings and made up bits of code - only then to go to http://docs.moodle.org/dev/Git_for_developers and also http://docs.moodle.org/en/Git_for_Administrators and still remain frustrated because I still can't understand the instructions.sad Now I know what it feels like for all those posters who come on here tearing their hair out as a last resort..

While I realise that if you are using GIT it is because you probably know what it is and how to use it already, I don't want to be beaten just because I am an "ordinary" user and not a Git Geek.

If someone could help with the following in idiot-proof one step at a time instructions then I promise that when I get more familiar with it all I will add it to the up-and-coming   documentation on Git on Windows for dummies so that  every regular Windows user can have the benefitsmile

So :

I want 2.3.1 via Git to go   on my laptop in C>wamp>www>moodle23. I made that folder and I made the database. Where to next?

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: GIT for dummies

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I don't know any developers using Git on Windows ... that may be the root of the documentation issue.  smile

I can recommend that you not worry about using the command-line (the black box) and to instead try one of the many GUI clients out there.   eg http://www.makeuseof.com/tag/5-windows-git-clients-git-job/

TortoiseGit might be the simplest alternative that will be enough to easily "fetch" an initial copy of the current Moodle repository into your home directory and then "pull" updates of new versions whenever you want to.  All the rest is really only useful if you are editing code and sharing those edits.

Perhaps someone else might like to contribute some detailed instructions to this discussion as I don't have Windows handy.  This looks like a good start.  When it comes time to enter the Moodle git repository, use git://git.moodle.org/moodle.git and choose the MOODLE_23_STABLE branch.

Average of ratings: Useful (2)
In reply to Martin Dougiamas

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Thanks Martinsmile I have no issues NOT using Windows; the only thing is I am using my school laptop which IS Windows and I'm not so sure how happy they'd be if I just installed Linux all over it. Going to try your and Howard's suggestions and then  I was thinking of getting myself an old second hand laptop, putting Linux on it and doing it  that way if all else failsbig grin

In reply to Mary Cooch

Re: GIT for dummies

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

I use TortoiseGIT for my development of Collapsed Topics and maintaining six installations of Moodle on my machine.  I do a 'Pull' most weeks to keep up to date.  It has a good graphical difference program which you can appliy between versions of files in the log.  I find it easy to use and only revert to the command line if I need to delete a tag or a commit - in which case I often Google the syntax for the command.

If you want to run Linux on your laptop and it is a new and modern one then you could always run it virtually within the same machine using VirtualBox - www.virtualbox.org.  I believe it is also possible (not tried yet) to run a Git server / client on a 'Raspberry Pi' if you wanted to try out using Linux cheaply.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yeh - VirtualBox is the business.

Being suitably progressive, I use Ubuntu Linux as my main system and then virtualise Windows within it using VirtualBox. Each to their own I suppose big grin
In reply to Howard Miller

Re: GIT for dummies

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

ROFL - wonderful Howard big grin

In reply to Gareth J Barnard

Re: GIT for (not quite so) dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Progress report: the penny has dropped about half way nowsmile Here is the photographic evidence - on my (Windows) laptop I now have the latest 2.4 dev (which Mary Evans started me off with)

Additionally I have a 2.3.1:

One of the reasons why I was so confused was that - since I already had a moodle folder in C wamp www I couldn't see how I could get 2.3 without overriding my 2.4. Then of course I realised I only had to rename my first moodle folder on my laptop (to moodledev) then it wouldn't matter! So once I had figured that out, it took me about ten minutes to get a 2.2:

The other thing I hadn't understood (and thanks to Martin et al for elucidating ) is that you can't just download a 2.2 or a 2.3 -you have to first of all get ALL of MOODLE and then change it to the one you want. Sort ofsmile 

Sorry if this sounds obvious to experienced Gitters but if these things stumped me then they might confuse others too.

Finally and most importantly:

I now have 3 folders on my laptop - moodledev, moodle22, moodle23. What precisely do I type into the box below to get the latest weekly updates making sure they go into the correct folders for the correct versions? 

Average of ratings: Useful (1)
In reply to Mary Cooch

Re: GIT Virtual box

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Gareth/Howard - I  actually have an Oracle VM Virtual box on this laptop (Ubermix/Ubuntu) that I think Richard Oelmann put me onto last year. I have never really played with it though.

In reply to Mary Cooch

Re: GIT for (not quite so) dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yes - it's difficult to remember now what was hard to understand.

You download the whole Moodle hostory, all the branches the lot. What you see immediately after a clone is the 'master' branch which in Moodle's case (and usually) is the latest development code.

To get other versions you have to change to 'checkout' other branches. These are all named like MOODLE_19_STABLE, MOODLE_22_STABLE etc. Note that what you are getting is the latest version of that branch (it's called the HEAD of the branch in Git-ese). If you actually wanted say, 1.9.8 for some reason you can do that but you need to checkout a 'tag'. A tag is a mark in the sand made when that particular release was made. Somebody did that manually as part of the release process and it's stored in the repository.

Again, the name of the containing directory is unimportant and you can simply copy the thing as often as you like and checkout different branches. Each one still 'works'.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: GIT for (not quite so) dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Thanks! So - er- how do I get the next updates into my three moodle folders? What commands do I type?

In reply to Mary Cooch

Re: GIT for (not quite so) dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you created the branch with a command like

git checkout -t ...

then you should only need to type

git pull

If you type that now, having just set everything up, then it will probably just output a message like "Everything is up-to-date." After next week's weekly is out, it should do something a bit more exciting.

In reply to Tim Hunt

Re: GIT for (not quite so) dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
What he said ^^

If you want to do it the long way...

git fetch
...will pull all the latest changes from Moodle but will not touch your current code, then

git merge origin/MOODLE_22_STABLE
...(substitute correct branch) will add in the latest changes, if any (to your current, checked out code only). However... BEWARE... if you are in your directory with 2.2 checked out and you accidentally merge MOODLE_23_STABLE it won't save you. You'll get pages and pages of merge errors because they don't 'match'. Because Git keeps a history of everything it's fixable, but...

git pull is just shorthand for fetch then merge but it will only work if you have explicity told Git to track the remote branch (the -t)

I always say use...
git status
...a lot, read it, and have a think before doing anything. It tells you were you are.
In reply to Tim Hunt

Re: GIT for (not quite so) dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I just did - and it just did -

bring on smile

In reply to Mary Cooch

Re: GIT for (not quite so) dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The 'public' git repositories contain the Moodle 'weeklies'. So, you only get new stuff once a week (it's updated on a Wednesday I think). If you need specific changes in a hurry you can get stuff from maintainer's Github repositories. That's when the fun starts......
In reply to Howard Miller

Re: GIT for (not quite so) dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Well I will start with weekly fun and then I will progress to fun at will as and whenbig grin

In reply to Mary Cooch

Re: GIT for (not quite so) dummies

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Mary,

I haven't seen it mentioned so sorry if I am stating the obvious, but don't forget, now that you have multiple versions of Moodle all on the same "server" you will need to give each of them a different Cookie Prefix in Site Administration > Server > Session Handing.

A few years ago when I started migrating my site instead of updating it, it took me about an 30 minutes to figure out why logging out in one Moodle was logging me out of all of them I had on my server. Wouldn't have been so bad except that I was demonstrating to students at the time. blush

AL

Average of ratings: Useful (1)
In reply to AL Rachels

Re: GIT for (not quite so) dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Al - does this apply even on localhost on a wamp server?

In reply to Mary Cooch

Re: GIT for (not quite so) dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's actually because your browser tries to set a cookie called 'moodle' for the same server ('localhost' in this case) even though they relate to different moodle sites. I'm not 100% sure but I think that the 'sessioncookiepath' which is set automagically more or less covers you in Moodle 2 but I do tend to set the 'sessioncookie' name (to 'moodle23', 'moodle22' etc.) just to be on the safe side.
In reply to Mary Cooch

Re: GIT for (not quite so) dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Actually, I think recent versions of Moodle correctly guess Admin -> Server -> Session handling -> Cookie path. If your Moodles are installed at moodle22 and moodle23, then when you install, it will set the paths to /moodle22/ and /moodle23/ respectively, and that is enough to avoid the log-in/log-out problem.

Exactly when the weekly build comes out is not predictable. The most reliable way to know what is going on is to watch the integration dashboardhttp://tracker.moodle.org/secure/Dashboard.jspa?selectPageId=11350. On that page, the middle column is this week's integration, and the best summary is the pie chart at the bottom of that column. On Monday, that starts with everything 'Waiting for integration review', and by some time on Wednesday, or more usually Thursday, everything ends up as 'Tested'. Then they build the weeklies, and then the middle column gets reset ready for next week.

The right-hand column summarised what has been integrated in the past. The left hand column summarises what might be coming in the future.

Average of ratings: Useful (2)
In reply to Tim Hunt

Re: GIT for (not quite so) dummies

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Tim "Actually, I think recent versions of Moodle correctly guess Admin -> Server -> Session handling -> Cookie path. If your Moodles are installed at moodle22 and moodle23, then when you install, it will set the paths to /moodle22/ and /moodle23/ respectively, and that is enough to avoid the log-in/log-out problem."

I confirm that this is how recent versions of Moodle work. No need to set different cookie names for each moodle installation.

Joseph

Average of ratings: Useful (2)
In reply to Gareth J Barnard

Re: GIT for dummies

by Nigel Irwin -

Ok I have just installed TortoiseGIT I have an existing moodle dev site set up under xamp. How do I use TortoiseGIT to pull down the other versions.

In reply to Nigel Irwin

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

To start with, just try getting the Moodle files into a folder on your desktop. Git calls this doing a clone. You want to clone git://github.com/moodle/moodle.git, and you will probably also need to choose a branch, which might be MOODLE_23_STABLE.

Once you have got a folder that is a git repostiory, you can safely move it somewhere else (for example, from your desktop and in to xampp). If you want to know why it is safe, then suppose the folder is called moodle23, then all the special stuff that git needs is stored in a hidden subfolder moodle23/.git. As long as you move the whole moodle23 folder, inluding the .git subfolder, then you will still be able to use git to get updates, and so on.

In reply to Tim Hunt

Re: GIT for dummies

by Nigel Irwin -

So if i then use the name of the folder ie Moodle 23 for my installation it will work despite the code files being inside the .git subfolder?

If i wanted to included other bracnches like take a look at the 2.4Dev would i need to create another folder for that and then place that in the xamp?

Would i need to create a new database for each version?

In reply to Nigel Irwin

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

You would need to create a new database for each version yes.

In reply to Mary Cooch

Re: GIT for dummies

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Or use a different prefix for each installation in the same database smile but Mary's solution is better unless you are restricted to a single database.

In reply to Nigel Irwin

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I obviously did not explain very well.

The moodle23 folder will contain all the Moodle code files as usual.

The .git subfolder contains other stuff that is probably of no interest to you, but which is of interest to git (and tortoise git).

In reply to Tim Hunt

Re: GIT for dummies

by Nigel Irwin -

TY Tim, I just hadnt looked into the folder before i posted my question

In reply to Martin Dougiamas

Re: GIT for dummies

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I use GIT for Windows but I didn't respond to the first question because I am not very familiar with it, probably because I use it just for my own projects. I have mainly used it from the command line.

In reply to Martin Dougiamas

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I seem to have got here too late to be helpful, but here are some thoughts.

Most of the OU developers use git on windows, including me. (Mostly Msysgit, some cygwin.)

The standard command-line on Windows is really horrible, so if you find yourself using it a lot, it is worth being aware of http://sourceforge.net/projects/console/.

Github has good tutorials for getting started with git on Windows, Linux and Mac (https://help.github.com/articles/set-up-git).

If you really want to understand what git is doing, then my best tip is to use the command "gitk &" to look at what is going on in your repository, and see how that changes as you execute commands. However, you probably don't need to understand at that level of detail if you are just doing 'git for administrators' types of things.

One of the things I believe about education is that anyone can learn anything if they have the inclination and are able to invest the necessary time and effort. Congratulations for demonstrating that Mary.

Average of ratings: Useful (5)
In reply to Tim Hunt

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

<quote>One of the things I believe about education is that anyone can learn anything if they have the inclination and are able to invest the necessary time and effort. Congratulations for demonstrating that Mary.</quote>

Yes - as my pupils would say: Get Me!  big grin

 

In reply to Mary Cooch

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If it helps when I first started looking at git it completely fried my brain. There are a few basic concepts you have to get your head around before it starts to make any sense. Unfortunately, it was written by uber-geeks and, while very clever, has some serious deficiences in both the UI and the very terse help (it makes perfect sense when you understand it already).

I asked a load of questions in the developer forums here and got lots of help. There is a good Git mailing list but it's populated by the kind of people who chew you up if you don't quote properly in emails and such so beware.

Anyway..... I can *only* talk about command line instructions because I don't use anything else. However, the graphical ones usually seem to simply mirror these so I hope you can work it out. You could always have a really bad day and just load Linux on your PC :D

Firstly... to get 2.2..

git checkout git://git.moodle.org/moodle.git
(will create a 'moodle' directory with the latest dev code and a .git subdirectory with all the past history of Moodle in it)
cd moodle
(go 'into' that directory - UI equiv is probably a right click on the directory)
git checkout -t origin/MOODLE_22_STABLE
('switches' to the latest 2.2 branch. Further explanation follows)
.....time passes....
git pull
(in the same place will grab the latest changes to 2.2 and update your Moodle - that's what the -t says - track)

Obviously, you can simply copy or move that code to your web server directories and go from there. Once you've got it you don't have to call the directory 'moodle' it doesn't matter.


Secondly... to get 2.3...

Just copy your 2.2 directory to a new directory (say 'moodle23'), then go into the new directory. There's no need to re-clone, but you can if you want to. In the new directory...

git checkout -t origin/MOODLE_23_STABLE
(switch from 2.2 to 2.3)
git pull
(make sure you have the latest code)

Notes...
- the above assumes you haven't made changes to the code. This is another discussion
- don't worry about config.php. Git ignores that file.
- the -t in the checkout means 'track'. This makes the pull work. It says 'track the remote repository, in this case 'git.moodle.org'.
- origin is the local name of the remote repository, so (in this case) origin == git.moodle.org (a lie but it will do). The first 'remote' when you clone is always called origin.
- when you clone and on subsequent pulls or fetches the entire remote repository is synced to a local copy (although it still looks kind of remote - the origin thing). This is the cool thing. You have all of Moodle even if you have no network.

Good luck - ask questions!!
Average of ratings: Useful (4)
In reply to Howard Miller

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Thanks Howard; you've made my day! (I haven't looked at any of it yet as I  am going to make a cup of black coffee and take a deep breath firstsmile) I actually remember the days when GIT fried your brain several years back!

In reply to Mary Cooch

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Forgot to mention, if you are behind your school's firewall then the git://.... url might not work. The nice thing is that git handles several different protocols. Github has a mirror of Moodle and that let's you use old-fashioned HTTPS. It's slower, but it works. The clone command will be...
 
git clone https://github.com/moodle/moodle.git
Average of ratings: Useful (1)
In reply to Howard Miller

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I am going to be using it at home Howard because nothing gets past the school's firewall smile

In reply to Mary Cooch

Re: GIT for dummies

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Not even naughty pupils?

In reply to Marcus Green

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Nosmile And even if it did, we have software that records their every key strokesmile

In reply to Mary Cooch

Re: GIT for dummies

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I find that many young people seem to feel that "I'm on the internet so I am invisible" and I have to explain that everything they do will probably be visible to their children, their grand children and their ..... you get the picture.

In reply to Mary Cooch

Re: GIT for dummies

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Mary "we have software that records their every key stroke"

... à la Big Brother?

Josephclown

In reply to Joseph Rézeau

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Yes Joseph; Big Brother is becoming the norm in many schools.  That is of course in addition to the teacher being able to see and control each pupil's computer from their own teacher computer at the front. It's just accepted now as a necessary evil by the pupils.

In reply to Mary Cooch

Re: GIT for dummies

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

And indeed the Network Administrator can use the same software to look at any machine in the entire school.  I found this feature useful for remote control to help when support questions came in over the telephone.  Also useful for remote shutdown to save the carbon footprint.

On the positive side for teaching it helped to quickly have a student demonstrate what they had done and project it via the teachers (my) computer without all the technofaff of cable unplugging / log out or in.

In reply to Howard Miller

Re: GIT for dummies

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Howard

Thanks for your detailed explanations!

Did you have a chance to test them with a real dummy? Specially the part, "when you clone and on subsequent pulls or fetches the entire remote repository is synced to a local copy (although it still looks kind of remote - the origin thing)."? Sounds demeaning at first glance.

As a whole, I wonder whether the subj. is a contradiction. For those who haven't seen it, this is the introduction to git by its creator: "Tech Talk: Linus Torvalds on git" .
Average of ratings: Useful (2)
In reply to Visvanath Ratnaweera

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I have just switched on and watched the first few seconds of that video (I will watch the rest in a minute) but had to post the quote by the announcer: " a revision control system  that's expressly designed to make you feel less intelligent than you thought you were")big grinbig grin

In reply to Mary Cooch

Re: GIT for dummies

by Derek Chirnside -

Don't you mean Mary, you'll watch the rest in 1 hour and 9 minutes.  Today I was home with cold, I watched the whole thing.   Fascinating.  I now have a few questions. I'll read a bit first.

Well done in getting to the stage you have Mary.

In the light of this video, it is interesting that people complained about the shift from CVS.  Just any change is resisted I guess. 

I think it's getting to time for another wish list for Moodle core.  I think I see now: you could have fixes for CSS problems in themes, a few reports, some plugins, some e-mailing functions: all pulled into a branch and then used for an install.  Seems too good to be true.

-Derek

In reply to Mary Cooch

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I feel that I should hate Linus but despite everything he actually seems like quite a cool guy tongueout
In reply to Visvanath Ratnaweera

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
"Sounds demeaning at first glance"

Huh?

If that was a dig then I appologise. I just typed all that in rather quickly in the hope it helps. It wasn't meant as the first chapter in my new book on git wink

Some steps are a whole subject area of explanation by themselves that you can live without knowing on the first pass. The whole business with remotes or 'upstream' as some people seem to call it can get spectactularly confusing.
In reply to Howard Miller

Re: GIT for dummies

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Howard

You wrote:
> If that was a dig then I apologise.

No need to apologise. I used the term "demeaning" not knowing a better alternative. Humour is dangerous, specially in a foreign language. This message is plain text, I promise.

Right from the beginning I thought there is something odd in the subj. First I thought it is the GIT http://mcphersonz.wordpress.com/2010/02/18/why-is-git-called-git/. No, I know it now: I have a fundamental question: Is git for dummies?

I think, when the announcer Andrew Morton said "a revision control system that's expressly designed to make you feel less intelligent than you thought you were", he was not joking. Watch 0:28:50 in the video: "When Andrew sends me patches -- he doesn't actually use Git, it's some kind of defect -- ..."

Or Linus himself says something like "git taking time to wrap around one's mind" and then continues to say, "the distributed system is the way we are wired". Are you sure? May be in LKML, but in moodle.org?

Please don't misunderstand. This is not an appeal to revert to CVS. It is the other way, isn't it amazing that Linus makes hundred thousends people to "rewire" their brains!
In reply to Visvanath Ratnaweera

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Git is very good in some ways and spectacularly terrible in others.

The fundamentals are very clever and make it worth the trouble. The difficulties are, to my mind, some combination of the following...
- If you are used to CVS or Subversion or anything with a central repository then it's very difficult to un-learn that way of doing things. I found that incredibly difficult. Git's distributed model means that you can configure your development team and your work flow in any way you like. A question of "what's the best way" is always answered with "it depends". Having said that, most developments end up with a central repository again. But.... it isn't the same as CVS or Subversion it's merely a convenience.
- The commands are not well planned. Beyond the basics, you'd never guess the right way to do certain things. The switch for tracking a remote repository is '-t' in checkout and '-u' in push. '-u' does something else again with 'git add'.
- Some commands are simply beyond human comprehension. Well, my comprehension anyway. I see something like git as a tool to make life easier not an end in itself. The developers have crossed the line in places.
- The help is rubbish. It is mostly accurate but only seems to make sense when you have worked it out by some other means. Perhaps you could argue that help is just that - a reminder when you forget.
In reply to Visvanath Ratnaweera

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I disagree with this. Git is acutally far more natural than other version control systems. You only need to re-wire your brain if you ever made the mistake of wrapping your brain around less natural version control systems like CVS or SVN.

To justify that, have you read the Git parable? http://tom.preston-werner.com/2009/05/19/the-git-parable.html

In reply to Tim Hunt

Re: GIT for dummies

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

If you have been involved with projects that use CVS or SVN it would seem harsh to consider it a mistake to learn these products. In my commercial work I have use the Borland and Microsoft version/source/revision control tools. They perform the role of making all other similar tools look very good indeed.

In reply to Marcus Green

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I did not meant to say it was a mistake to learn CVS. At the time, they were among the best tools for the job. I just wanted to say that if you were indoctrinated into them, then that made learning git harder.

For some reason, I am reminded of the Antoine de Saint Exupéry quote "It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove." but I am not sure if it entirely fits the bill.

In reply to Tim Hunt

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
True - but if you are old (like me) then you've probably spent the last twenty years (or whatever it is) using CVS or Subversion. I really struggled with this - no matter how much I was told it was 'distributed' I couldn't get my head around what this actually meant in practice.

I think that's what I was trying to say - it *is* more natural but it's hard to see why when you've been doing it the same way for years.

Tom's right in the sense that the 'trick' to Git is to properly understand it's concepts. They are tricky from a standing start though.
Average of ratings: Useful (2)
In reply to Howard Miller

Re: GIT for dummies

by Ryan Smith -

This thread has been pretty helpful with those of us administrators struggling to switch from CVS to Git.

My major question is: In Git, how do you get a list of the files updated each time you pull an update? Currently using TortoiseCVS, when you update a repository it lists which files changed in the window. This is essential because we have several custom code changes and we have to re-integrated that code when the Moodle files are updated.

Using GIT, when I do a git pull on my moodle_23_stable branch, it gets the new files but I don't see anywhere where is lists all of the changed files. It does show several files in the command window, but they are cut off by the window so you cannot see all of them.

In reply to Ryan Smith

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well... to actually answer the question as you asked it. Find the last commit before you do the pull. Do git log and take the first commit ID you see. Then do the pull and then

git diff --name-only ID

....where ID is the ID you saved. This shows the files changed between that commit and HEAD (i.e. now)

BUT... this isn't the best way to do it. You want to get your changes into git and then git will do all the work for you. I don't have time to explain this in huge detail but I'll try to give you some clues. Others might come along and explain better.
1. create a new branch to work on
2. get your changes in to the current version somehow (if you know the changes to make then good)
3. commit your changes to the new branch

...your changes are now all in Git. Good...

4. when you want to do an update, rather than pulling to git fetch and then git merge origin/MOODLE_22_STABLE (or whatever branch you are following).

The last step will attempt to merge the latest changes with YOUR version of the code. On a good day it just works and you will be all happy. Sometimes you will have conflicts to fix. You can go and read about fixing Git conflicts. It's not hard and is certainly a lot easier than remaking all your changes.

For security, you are best to get a (free) Github account and pushing your new version there (clue - you will have two remotes now) this means you have at least one copy. Sharing out git repos is backing up for free smile
In reply to Ryan Smith

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, git lets you do this a better way. Rather than just doing a pull, and then seeing the list of files after all the changes have been made, why not just do a fetch. Then you can look at the changes, and when you are happy, you can merge them in.

Using the command line, that would be

git fetch origin
git log MOODLE_23_STABLE..origin/MOODLE_23_STABLE
git diff MOODLE_23_STABLE..origin/MOODLE_23_STABLE
git merge origin/MOODLE_23_STABLE

(Git pull is just a shortcut for git fetch origin, git merge origin/MOODLE_23_STABLE.)

I am sure you can do the same using tortoise git.

In reply to Howard Miller

Re: GIT for dummies

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Now I know how much planning has gone into git. For example, the "upstream" has the whole history of Moodle!

This is how I checked:

- http://docs.moodle.org/dev/Git_for_developers#Setting-up_the_public_repository

- http://docs.moodle.org/dev/Git_for_developers#Setting-up_the_local_repository_at_your_computer

- following http://moodle.org/mod/forum/discuss.php?d=168094#p737210
$ cp -r LOCALDIR moodle19

$ cd moodle19

$ grep friendly version.php
$release = '2.4dev (Build: 20120816)'; // Human-friendly version name

$ git checkout -t origin/MOODLE_19_STABLE
Branch MOODLE_19_STABLE set up to track remote branch MOODLE_19_STABLE from origin.
Switched to a new branch 'MOODLE_19_STABLE'

$ grep friendly version.php
$release = '1.9.19+ (Build: 20120816)'; // Human-friendly version name

Amazing!

More amazing: The switch took 1.2 sec on my netbook! (measured with the Unix 'time' command)
In reply to Visvanath Ratnaweera

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There are some even more amazing things you can do using the fact that you have the entire history of the project. Some examples:

git log       <- shows you the history.

git log question/type/essay       <- shows you just the changes that affected the essay question type.

git log --grep MDL-32359       <- find the changes that fixed bug MDL-32359

git log -S 'questiondecimalpoints'       <- find any change that added or removed the questiondecimalpoints from the code.

The third of those is useful if you want to see what the fix for a particular bug was. You can then see what that change was by doing

git show f9e41d206dcc6f5

However, this is probably heading away from git for administrators, and towards git for developers.

In reply to Tim Hunt

Re: GIT for dummies

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

Thanks for tips! Will check in leisure.

True, this is drifting too far. Looks like the train left over a year ago: http://moodle.org/mod/forum/discuss.php?d=168094.

Talking of git for administrators, what is the equivalent of
# cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_169 moodle
...
# cvs -z3 -d:pserver:anonymous@SERVER.cvs.moodle.org:/cvsroot/moodle co -P -r MOODLE_23 moodle

etc. ? "git clone git://git.moodle.org/moodle.git" gives me 2.4dev (on the surface).
In reply to Visvanath Ratnaweera

Re: GIT for dummies

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

when you do a git clone, you can use the -b option to specify a particular branch, and you can specify the name of the folder to check out into:

git clone -b MOODLE_23_STABLE git://git.moodle.org/moodle.git htdocs/moodle23

That does branches. If you want a particular release tag, then I think you need to do that with a separate command afterwards:

git checkout v1.9.6

typing "git tag" will list all the tags that exist. 

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I suppose there's a middle ground where administrators are adding plugins and fiddling with themes etc. It still makes sense to understand and use your own branches to maintain those. Even more so if you have multiple installations.
In reply to Tim Hunt

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
One I seem to use a lot is, having got a Moodle version number, find the original commit of that version...

git log -S '2008060101' version.php

then do a checkout on the SHA1 of the first result.

So, if someone tells you they are running some version or other you can pull 'exactly' that version of Moodle regardless of when it was.

Even more devious... if they have made changes you can copy your .git folder into their version and now 'git status' will immediately show all their customisations from core. Magic big grin
In reply to Mary Cooch

Re: GIT for dummies

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Mary,

Greetings from one (former) GIT dummy to a new one! As I read through the posts in this discussion, with all the usual helpers helping you out I can remember all those questions about GIT and MOodle I asked myself, asked on these forums, perused the GIT documentation for help, etc.

I currently use GIT for my Moodle installation on my local computer, under Windows 7. I feel it's a pity that developers using GIT under Windows are considered at worst as non-existent, at best as weird beings.mixed I have stated quite a few times my dislike of the command line. Fortunately we have more user-friendly GUI systems, and I use TortoiseGit and it fills (almost) all my needs.

Like all those who have made the leap to GIT will tell you, it's a great system, once you've understood how to use it.

ATB

Joseph

In reply to Joseph Rézeau

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi again or rebonjour (which always makes me smilesmile!) I plan to add some "Git  for Windows users dummies" documentation as I develop my learning. I find one difficult issue is that there seem to be so many different ways to set it up and different commands -and stuff you don't need when you are starting out and so don't yet need to know. For instance, at the moment I just want to know how to get Moodle regularly onto my Windows pc. Then only later I might want to know how to send stuff back up there for others to consider.  So at the moment I am only on "Level 1 Git" if you like (or Foundation level even) but I will report back as I progress.

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Guilty as charged..... I must admit that I have (almost) *never* used Microsoft Windows and find it a bit of mystery. Although I use a mixture of Macs and Linux for development I use the command line. It's just quicker. The other huge (for me anyway) advantage is that I deal with loads of different remote servers and systems. I can just ssh in using a terminal. Some graphic based remote control would be incredibly cumbersome.

So, I am somewhat torn between saying "each to their own - obviously" and "for goodness sake, learn to use the command line" wink
In reply to Howard Miller

Re: GIT for dummies

by Glenys Hanson -

Bonsoir Mary,

Delighted to know you're doing all the hard work on understanding GIT because I know when you've sussed it out, you'll provide a delightfully clear updated doc all the rest of us real dummies will understand too.

And when you've done that, you can explain how to use the command line in three easy steps. wink

In principle, I agree with Tim Hunt:

<quote>One of the things I believe about education is that anyone can learn anything if they have the inclination and are able to invest the necessary time and effort. Congratulations for demonstrating that Mary.</quote>

But I also love it when other people do the hard stuff and economise my time and effort.

I don't know how to use GIT .. yet, but thanks to Visvanath's link to "Tech Talk: Linus Torvalds on git" I feel I understand its purpose and why its a great innovation.

Cheers,

Glenys

In reply to Glenys Hanson

Re: GIT for dummies

by Derek Chirnside -

I've done what I usually do and checked the blogs.  Here is one article: http://tomayko.com/writings/the-thing-about-git which at the end refers to Workflow.  I'd rate it alongside Tim's parable.  Not that I understand all of it, especially the last bit.

Git is complex.  There is no doubt about that.  There are lots of ways do to things.  The key it seems is to sort out a workflow to enable you to do what you want to do.  I've read several articles now, and tend to give up 2/3 the way through.  The model under the hood still disturbs my mind.  One of my friends up north with potentially several insitutions to host for has bought in help to set up GIT.  It seems to have been worth the money.  You have simple and clean way to upgrade, and manage a few add-ons. 

Am I correct here: getting to grips with GIT helps speedy upgrades, flexibility in what you do and how you do it?  It actually becomes less of a "Big Deal" to upgrade.  You can pull a small fix.

So remains the problems of plugins.  Is this true: you can know which GIT brances contain the plugins and pull the most recent code as well, including small one line fixes?  Putting this together, is this worth the effort?  It seems to me that it is.

The GIT thoughts I've read often are quite poetic and philosophical (some programmers can write well), as well as quite blunt and opinionated.  I was interested at how well Linus seemed to know the options out there.

And some random links:

-Derek

Average of ratings: Useful (2)
In reply to Derek Chirnside

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Derek (quote) Am I correct here: getting to grips with GIT helps speedy upgrades, flexibility in what you do and how you do it?  It actually becomes less of a "Big Deal" to upgrade.  You can pull a small fix. 

Yes that is my understanding, added to which you can also contribute by sharing/pushing/committing (whatever the term is) your fixes or improvements with others.

I want to learn Git for all those reasons. 

Glenys -I don't understand Git at all yet - I can merely copy letter for letter two commands -one to get Moodle and one to update itsmile But it's a start and one day I hope (like Mary Evans) to be able to create repositories, test the latest fixes as they happen, do all that forking stuff wink and, who knows, maybe one day offer something of my own even if it is only a language string (which is just about my limit!) And on the subject of language, I had to smile when Linus in the video, for all his fluency in English and Git, I swear he said "securier"!

And Howard- such is my ignorance that I don't know the difference between "the command line" and the other stuff I copy into my little black box (Windows power shell to give it its real name)

Average of ratings: Useful (1)
In reply to Derek Chirnside

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I've read some Git gurus who claim that Git is not intended for deployment. I can see why - on a large project like Moodle you can burn up some amount of disk space and if you are not very organised it can take a long time to clone a repository (answer - don't, copy it).

Having said that, Git is actually fantastic for maintaining sites. Upgrades on the same branch become absolutely trivial, upgrades to a different branch not much newer and grabbing specific fixes simple. It also helps us to maintain all sorts of custom builds of Moodle for different clients.

It also means that we have all this stuff duplicated all over the place. On the one hand this is wasteful, on the other hand we'll have to try very hard indeed to loose anything!!
Average of ratings: Useful (1)
In reply to Howard Miller

Re: GIT for dummies

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Having seen how Git is used with Moodle, I used it on my MSc project because of its easy ability to be operated stand alone without any form of server.  This gave the advantage of having version control, the ability to revert back changes and see a full log history.

I admit to prefering GUI's for most things having spent a year working on a project with only a VT320 terminal connected to a machine running OpenVMS.  The command line is there when you want power, the GUI is there when you want a little more speed and less use of brain power.

As for operating systems, that can be debated until the cows come home.  I don't really have a preference, but choose the one needed for the job in hand, having used Windows, Linux, Unix (Solaris and Silicon Graphics), Mac, OpenVMS, DOS, CPM........

Back to 'Git', its real power for Moodle comes with its ability to cope with multiple developers with a large hierarchy that are distributed all over the place.  So anybody can make a fork and start messing around without fear of mucking up things and having the ability to pull in and merge recent updates from the parent.  BTW has Maven ever been considered - as Moodle is a sort of project?  And is Mercurial better than Git?

One of the next things I want to try is a Git server on a Raspberry Pi smile

Cheers,

Gareth

Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: GIT for dummies

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Glenys

> [video on youtube] "Tech Talk: Linus Torvalds on git" I feel I understand its purpose and why its a great innovation.

Whether git is going to economise your time and my time is yet to be proven. Linus argues that git is the most natural thing (for him) becuase (he) is wired to think distributed [0:31:00]. Untill we take a DNA test, we don't know.
smile
In reply to Visvanath Ratnaweera

Re: GIT for dummies (Windows)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Nothing more to say, but just wanted to add the link to the (ongoing work in progress) documentation on Windows Git for dummies here in case anyone in ends up in this forum having done a search in future months.

Average of ratings: Useful (3)
In reply to Mary Cooch

Re: GIT for dummies (Windows)

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Mary,

I had a look at the page and it is an awesome amount of work smile.  For the 'localhost' issue you can always change the 'DocumentRoot' directive in the 'httpd.conf' file to point to the moodle folder instead of renaming it, such as ' DocumentRoot "c:\wamp\www\moodle" ' I would imagine - please see http://httpd.apache.org/docs/current/mod/core.html#documentroot

This may break the 'phpmyadmin' URL but if the file has been written correctly the alias should cope with this.

Cheers,

Gareth

In reply to Mary Cooch

Re: GIT for dummies

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

You should have e-mailed me!

In reply to Mary Evans

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I'm washing my dirty linen in public!smile (There's one for the non-native speakers!) Anyway- I am on with this today http://moodle.org/mod/forum/discuss.php?d=209845

In reply to Mary Cooch

Re: GIT for dummies

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Well contrary to what you say in Git for Dummies you DO need an account so you can FORK Moodle into it.

Also, when using WAMP and installing Moodle you do not need to make a moodeldata folder Moodle actually does that for you in the install stage finding the correct location.

To say I am a bit annoyed at reading this discussion is to put it mildly.

In reply to Mary Evans

Re: GIT for dummies

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Ah right I see! Well if you would like to corrrect it yourself please do so,  as I highlighted the link hoping people would check its accuracy - if not, then I will correct it myself later when I have done the school jobs I keep puttting off. And if you are annoyed at me posting here instead of emailing I am really sorry sad You are the person who got me started on the journey so I am more indebted to you than anyonesmile I just thought it would  be good to have a conversation in public so Windows people could pick it up in future months/years..

In reply to Mary Cooch

Re: GIT for dummies

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I understand and appreciate your motives for starting this discussion, that's OK when you want to get some reaction to an idea. However, as I see it from my viewpoint, all you have achived is more confusion, as there are many ways of working on GIT.
This is a big learning curve for you, as it was for all of us when we first used GIT. I think too, that it is a good thing for you as a teacher, because now you know how it must be like for children who don't understand the concept of something the first time round, and so takes you longer to teach them, and that's your teaching plan out of the window! smile

I think when you understand the concept of GIT you are half way there. It basically a track that has lots of branch lines leading to different stations.

- master - - MOODLE_23_STABLE - - MOODLE_22_STABLE -

I personally see it as a network of railway lines, and branch lines that have little steam engines on them like Thomas the Tank Engine.

I think to learn GIT you need to get into development, or at least do a couple of commits for BUG fixes. That bit is easy once you get into the way of doing things, plus you learn an aweful lot quicker. smile

There is a good Tutorial Sam H wrote for us themers a while back which you may find easier to understand.

http://docs.moodle.org/dev/User:Sam_Hemelryk/My_Moodle_Git_workflow

Mary

 

 

In reply to Mary Evans

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I can't help thinking that this is a bit harsh...

The advantage/disadvantage of Git is that it is very flexible and, for most people, the only way to get your head around it is to ask a bunch of random questions until it starts to make sense. All of Mary's questions where perfectly sensible and recieved the usual range of replies that one would expect.

I'm not sure what the alternative is - some sort of 'Moodle's way to use Git'. Well possibly; but that just leads to everybody following instructions blindly and I don't think that does anybody much good.

In reply to Mary Cooch

Re: GIT for dummies

by Yong Ra -

I use both CVS and GIT for my moodle sites. I still use CVS because one of my server has three different installation of Moodle. The instruction I found only uses moodle as the directory name. The three install has three different diectory name beucase I use vrtual host in the www directory. Is there a way to use the GIT with different moodle install directory name?

Thank you.

 

In reply to Yong Ra

Re: GIT for dummies

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Git doesn't care what the enclosing directory is called. So you can rename it, copy it, move it. You can do what you like. It will still work.

In your case.... clone the Moodle site and then make two further copies with different names. Done!