If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Git for developers

From MoodleDocs
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installing Git on your computer

Is this really the place for childish comments about the Windows OS? Some people don't have the luxury of choice when it comes to choosing their operating systems in their work environments... --Luis de Vasconcelos 06:02, 4 April 2011 (UTC)

Luis, apologies for the comment which has now been removed. Unfortunately I don't know how to install Git on a Windows computer - it would be great if you could help. --Helen Foster 07:48, 4 April 2011 (UTC)
;-> I'm still not very familiar with Git so I haven't added anything to the docs. However, there do seem to be quite a few guides on the internet that explain Git on Windows, example: An Illustrated Guide to Git on Windows and Set Up Git (Windows). But we probably want something less "generic" and more Moodle specific. I'll make some notes once I've figured it all out... --Luis de Vasconcelos 08:29, 4 April 2011 (UTC)
I know of several ways to install git on windows:
  1. Cygwin That is overkill unless you also want a complete suite of Linux tools on the windows command line (which quite possibly you do. This is my preferred choice.)
  2. msysgit This is the simplest distribution of git for Windows.
  3. TortoiseGit Integrates git nicely with Windows explorer.
  4. Eclipse's build-in support for git is still not finished, but lets you do some things: This is only helpful if you use Eclipse, and you will still need to use the command-line for some things.
Finally, I will add that being forced to use the command-line on Windows is like some sort of torture. Console give you a much nicer front-end. For example, it lets you copy and paste simply.
I am afraid these are only rough notes, which is why I am just dumping them here on the talk page. Someone should clean them up and put them on the main page.--Tim Hunt 10:22, 4 April 2011 (UTC)

Public repository optional, right?

A silly question: the page says "Installing *the* public repository" instead of *a*. To me that sounds like you have to have it, but isn't a solo dev just fine with a local repo also? -Samuli Karevaara 15:18, 25 June 2012 (WST)

upstream remote is already configured if moodle is cloned on github

For github users the upstream pipeline is already configured, so adding a remote is not necessary. This should be also the case for other clones.

If "upstream" is important to you, you can change the remote to:

  git remote rename moodle upstream 

Otherwise fetch script can be updated using "moodle" instead of "upstream".

  git fetch moodle
  for BRANCH in MOODLE_{19..27}_STABLE master; do
      git push origin refs/remotes/moodle/$BRANCH:$BRANCH