Download the Code
iDempiere sources are hosted at GitHub, you can download the complete project with:
cd $HOME/sources git clone https://github.com/idempiere/idempiere.git
Please replace $HOME/sources with the folder where you wish to download the whole sources, at least 4 GB are required.
Set the working version
If you are going to work with iDempiere development version (actually > 7.1) please execute:
cd $HOME/sources/idempiere git checkout master
If you are going to work with iDempiere version 7.1:
cd $HOME/sources/idempiere git checkout release-7.1
Local experimentation clone
Once you have downloaded the sources from GitHub you can easily clone locally your downloaded repository (for example for experimentation purposes) with an instruction like this:
cd $HOME/sources git clone idempiere myexperiment
This way you could experiment with a local clone instead of the downloaded from GitHub (in order to keep it pristine).
Keeping up to date
When you want to synchronize your local clone with GitHub again you can do it with:
cd $HOME/sources/idempiere git pull
and/or, similarly for your local clone
cd $HOME/sources/myexperiment git pull
Note that first one will pull from GitHub, and second will pull from your local clone.