Note:

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

Git Migration Workflows: Difference between revisions

From MoodleDocs
mNo edit summary
Line 4: Line 4:


Please edit this page to add your suggested workflows or questions for a workflow to do something.
Please edit this page to add your suggested workflows or questions for a workflow to do something.
= Preparing the environment =
[[Image:moodle-git-cvs-servers.png|frame]]
In the examples at this page, you are expected to use the following environment. Check the diagram. At the moment, there are two source code repositories you can use: the main Moodle CVS server cvs.moodle.org and its git mirror at git.moodle.org. While the CVS contains both Moodle core code and the contributed code, the git mirrors the core code yet (this may be changed in the near future). We also expect you have some server (called nostromo at the diagram) that you and your team use and that you do the actual developing at the localhost machine.
* <code>git clone</code> can be used to create a mirror of the git.moodle.org repository at nostromo
* <code>git pull</code> can be used to fetch and merge the upstream changes
* <code>git cvsimport</code> will be used to create your own git mirror of a contributed code
* <code>git push</code> will be used to backup your own work and to share it within your team before you send it upstream (and you will, right? ;-)


= General Model for Commiting to HEAD =
= General Model for Commiting to HEAD =

Revision as of 11:18, 26 October 2009

Quite a number of developers are now familiar with git and are enthusiastic about the power and flexibility it brings to the development process. It is not clear how workflows in the current development process will transfer if a switch to git is made.

Git doesn't place constraints to one model of development which is both a feature and a hindrance for people understanding how the development process takes place. A number of workflows need to be developed in order that developers can understand how git would fit into moodle development.

Please edit this page to add your suggested workflows or questions for a workflow to do something.

Preparing the environment

moodle-git-cvs-servers.png

In the examples at this page, you are expected to use the following environment. Check the diagram. At the moment, there are two source code repositories you can use: the main Moodle CVS server cvs.moodle.org and its git mirror at git.moodle.org. While the CVS contains both Moodle core code and the contributed code, the git mirrors the core code yet (this may be changed in the near future). We also expect you have some server (called nostromo at the diagram) that you and your team use and that you do the actual developing at the localhost machine.

  • git clone can be used to create a mirror of the git.moodle.org repository at nostromo
  • git pull can be used to fetch and merge the upstream changes
  • git cvsimport will be used to create your own git mirror of a contributed code
  • git push will be used to backup your own work and to share it within your team before you send it upstream (and you will, right? ;-)

General Model for Commiting to HEAD

Summary: How do developers 'commit' to the canonical repository?

  • Developers 'push' to a central repository as happens with CVS now. Commit access is granted via ssh. (But external contributors can publish their git repository branches to developers with commit access for inclusion to the mainline)
  • Developers push to their personal repository and an integrator/gatekeeper approves and merges changes (e.g. linus kernel branch)
  • Others/hybrid approaches?

Commiting to STABLE branches

Summary: How do developers commit to the stable branches? How do we ensure changes have been merged into head?

Customizing a CONTRIB plugin

Summary: This suggested workflow can be used by developers who are working on a customization or a fix of a contributed Moodle plugin. You want to keep the track of your local changes and eventually send some of you changes back to the upstream.

Prepare a git mirror of the CONTRIB module