FAQ Get,update GIT project sources
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 and add the GIT update URL:
http://download.eclipse.org/egit/updates
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 add repostiroy on your GIT client tool. With Eclipse, choose "Clone GIT repository" for this GIT URL: git://github.com/Dolibarr/dolibarr.git
Choose the branches you are interesting in. Branches not selected now could be selected later by doing a "Fetch" from the "Remotes" view.
Then, create a PHP project from Eclipse assistant. Choose "Create from existing project" and select directory that is your GIT local repository.
Then right click on project and Choose "Team - Share". Select GIT and select project available into list.
Get last version of sources using a full GIT 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 add repository on your GIT client tool. With Eclipse, choose "Clone GIT repository" for this GIT URL: git@github.com:Dolibarr/dolibarr.git
A HTTP URL is also available but is sometimes offline (so use first one instead): https://yourgitlogin@github.com/Dolibarr/dolibarr.git
Choose the branche you are interesting in. You can choose several branches but it is highly recommanded to choose only one branches (if you want to work on several branches, it is easier to restart the full process a second time to choose the other branch).
Once remote repository is linked into your client software, you must create a local branch.
First go into GIT view - Branche - Local. In most cases, your branch should be already available. If not, rigth 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".
Then, create a PHP project from Eclipse assistant. Choose "Create from existing sources" and select directory that is your GIT local repository.
Then right click on project and Choose "Team - Share". Select GIT, check box "Use or create repository in parent folder" and select project available into list.
Update your repository
To update your local workspace and local repository, right click on Eclipse project and select "Pull".
Commit and publish your changes
To commit changes 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".
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 files will overwrite old ones. The inconvenient of this method is that you must download and uncompress package each time you want to get updates.