Retrieving module from the Git repository
*For Browse the SVN repo on the web browser, find the project and release tag you are interested in, copy the URL and check out the project on the CLI or your favorite SVN tool.
The Git web interface can be found at http://git.magnolia-cms.com
In this example we look at how to check out the STK Module from the GIt repository. 2.0.3
- Go top http://git.magnolia-cms.com
- Search for "standard-templating-kit" with the search tool. You should get two hits:
- Click ** modules/standard-templating-kit.git. The project summary is loaded.
- Copy the anonymous, read-only URL
- Go to the command line and change to the directory where you would like to have your copy of the Standard Templating Kit project
git cloneand paste in the URL. The complete command should like like this:
This clones the entire git repository for the standard-templating-kit project to your computer. As thus clones all existing versions, this may take some time.
Locating required module
As you have now donwloaded all of the STK verions to your computer. The next step is to locate the version that you need.
- On the project summary on Gitweb scroll down to the "tags" section and look for the version tag you are interested in (2.0.3 in our example). If the tag does not show up in the short list, click on "..." at the bottom of the list to reveal the full tag list of this project.
- Click on the standard-templating-kit-2.0.3 tag. This will give you the details of this 2.0.3-commit
- Copy the commit hash ("2f6f171e8b74e861dd16d0c1240df6c393467682" in our case)
- Go back to the command line, change into the
standard-templating-kitdirectory created by our
git clonecommand above and set the clone back to the desired version using the following command:
git reset --hard 2f6f171e8b74e861dd16d0c1240df6c393467682
(Note to those with more git experience than me: Is this the best way to do it?)
Now you should have a perfect copy of Standard Templating Kit 2.0.3.
It's not too hard once you know what you got to do... but compared with SVN I have yet to discover the advantages of Git for this type of user.