Git for Coders

From Joomla! Documentation

Revision as of 18:19, 9 October 2012 by Dextercowley (talk | contribs) (outline and start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview[edit]

This article shows you how to use Git and Github to code and submit changes to the Joomla CMS. If you are not familiar with Git, you may with to read the tutorial Git for Testers and Trackers first.

The fist step is to set up the remote and local Git repositories. You do this once. Once it is set up, the normal workflow is:

  1. Update your local and remote repositories with changes others have committed to the main Joomla CMS repository.
  2. Create a branch for each issue or feature you are working on and commit your changes to the branch in your local repository.
  3. Update your remote repository on Github with your branches.
  4. Create a pull request from your Github branch. Alternatively, you can create a patch or diff file from your local branch and post that to the tracker.
  5. Update the Joomla Issue tracker or Joomla Feature tracker so that others can test your code.

Each of these steps is explained below. Note that you can use Git from the command line, from and IDE such as Eclipse (with the eGit plugin), or from a stand-alone tool, such as TortoiseGit. Here we will use the command line and, where applicable, show the equivalent command in Eclipse eGit.

Setup[edit]

Normal Workflow[edit]

Create a New Feature or Bug Fix Change[edit]

Keep Your Repositories Up to Date[edit]

Fixing Conflicts[edit]