FAQ Recuperar, actualizar GIT fuentes del proyecto
This is informations on how you can get sources of Dolibarr project. This tutorial explains steps to follow using Eclipse IDE.
Prerequisite
First you must have a working install of Eclipse. EGit plugin must also have been installed. For this, use the Find And Install process into Eclipse menu, add the GIT update URL:
http://download.eclipse.org/egit/updates
Then choose to install EGit.
Get last version of sources using a GIT anonymous access
To get sources with goal to edit them, you need a GitHub write access to the GIT remote repository, and a GIT client (GIT command line tool with Linux, or the GIT client in Eclipse).
First, enter value of the repository with reference sources into your GIT client tool. With Eclipse, choose "Clone GIT repository". Enter GIT URL of project to get. GIT Url for Dolibarr official source is:
git://github.com/Dolibarr/dolibarr.git
Your GIT client will ask you to choose the branches you are interesting in. Branches not selected now could be selected later by doing a "Fetch" from the "Remotes" view, so try to choose only the branch you need. This will save you time and problems later.
Once this step is validated, your GIT client will download all files from remote GIT server. This may last several seconds or minutes.
Once download is finished, go into GIT view - Branches - Local. In most cases, the branch you choosed should be already available. If not, right click on "Branches - Remotes - The branch you want to duplicate locally". If you choose "Create Branch", this will duplicate content of branch to work on it locally. If you Choose "Checkout", this will update the view "Working Directory".
Once your branch is created locally, create a PHP project from your Eclipse assistant by choosing "Create from existing project" and select directory that is your GIT local repository (Do not choose to create a PHP project from scratch).
Then right click on project from your Eclipse workspace and Choose "Team - Share". Select GIT and click on option "Use or create repository in parent folder of project".
Get last version of sources using a full GIT access
Process is same than getting sources with anonymous access. However, you must before create an account on GitHub (https://github.com/) and upload a public RSA or DSA certificate into your account profile.
URL to use for GIT clone is same:
git@github.com:Dolibarr/dolibarr.git
Note that a HTTP URL is also available but it's sometimes offline (so use first one instead):
https://yourgitlogin@github.com/Dolibarr/dolibarr.git
Update your repository
To update your local workspace, right click on Eclipse project and select "Pull". If made some changes into your Eclipse workspace on files that were changed into the GIT remote reference, your GIT client will make a merge automatically and will mark all conflict files as "conflict" (See later to solve this state). If not, you will get all new version files including all your changes.
Commit and publish your changes
To commit changes you made into your local repository, right click on file or directory to commit. This will validate changes into your local repository.
To upload them on the remote GIT repository, right click on project and choose "Team - Push to Upstream".
Solving a conflict
If a file has been marked as "conflict" after a Pull request, open the file to edit it. Find string "<<<<<<<<<<", you will see part of code that is conflict between "<<<<<<<<<" and ">>>>>>>>". Edit manually code lines and remove "<<<<<<<<" and ">>>>>>>". Then, go right click on file and select "Add". If you prefer to forget completely all changes you made into all files (so to restore you workspace with content of remote repository), right click on project top line and select "Reset" then "Hard" then "Reference - HEAD".
More information in GIT usage is available here.
Get last version of sources by download
This method allows you to get sources of main development branch (called HEAD): This operation consist to get last version of Dolibarr files that are packaged each night into a tgz file. For this, go on page with last source version of the day.
New file will overwrite old one. The inconvenient of this method is that you must download and uncompress package each time you want to get updates.