This tutorial provides step-by-step instructions on how to:
- Download the EGit plugin - optional
- Locate a repository in Magnolia CMS Gitweb
- Retrieve and clone a repository
- Import Maven projects
Recent Eclipse releases already included GIT support. Users might not have to install EGit anymore, just use built-in Eclipse function.
Git and Eclipse
Git and Eclipse are third party software. If you are new to Git or to distributed version control systems in general, make sure you read Git for Eclipse Users first. More background and details can be found in the on-line book Pro Git.
- Git usage - source code location and tips on the Magnolia Wiki.
- Checking out modules - how to retrieve and identify modules in the Magnolia Git repository.
- Setup instructions - download and setup for different operating systems. Includes setup instructions.
- Cheat sheet
- Videos - help to get started with Git.
- Working with IntelliJ IDEA and Git
Using Eclipse to access the Magnolia CMS codebase on Git
Please ignore downloading and installing EGit if your Eclipse already has GIT support.
Downloading the EGit plugin (optional)
To access the Magnolia CMS Git repository you need the EGit plugin for Eclipse.
- Go to the Eclipse marketplace and search for "EGit".
- Download the latest version and restart Eclipse.
- When Eclipse restarts, select from the top menu bar Window → Open Perspective → Other... to see the available perspectives - including the newly added Git Repository Exploring.
Accessing the Magnolia repository
To access the Magnolia CMS Git repository:
Open Eclipse and select or create a local workspace to save the cloned repository in.
Go to Git view perspective
Locate the repository URL in Gitweb
To retrieve and clone a repository you first need to locate and copy the path to that repository.
- Go to Magnolia GIT web https://git.magnolia-cms.com/ Note that you may be asked to insert your credentials.
- Browse to the URL of the repository.
- Copy the full repository path then paste to your Eclipse Git View.
Cloning the repository
Cloning the Git repository means copying the repository content to your local machine.
- Enter the URL (referred to as URI in Eclipse) of the source repository. Note that the Host and Repository paths populate automatically when you provide the full URL.
- Select the transfer Protocol and provide your Magnolia CMS Git repository credentials to your Eclipse instance. The transfer protocol specified in Eclipse should be the same as that specified in the URL in Gitweb.
- If you will be accessing Git frequently, select the Store in Secure Store checkbox.
- Click Next.
- The cloning process consists of two aspects:
- Branch info download
- Specific branch/file cloning
- When Eclipse has finished getting the branch information, select the branch(es) you wish to clone.
- Click Next and then choose the local directory to store the cloned files in. The default save location is the workspace you selected/created on opening Eclipse.
- When the cloning process is complete the cloned files will be available in your Eclipse workbench. Going forward you can search for and clone files directly from within Eclipse.
Importing a Maven Project
- In the Git Repositories view, right-click the project and select Import Projects.
- On the dialog, select the required option and click Next/Finish.
- Select the Maven Wizard and then the specific Maven artifact.