From BlenderWiki

Jump to: navigation, search

1. Get the source

The first step is to get the latest Blender source code from blender.org's GIT repository.

Copy and paste the following instructions into a terminal window. The following commands create a blender-git folder in your home directory by downloading the latest source code commonly referred to as 'master'. An Internet connection is needed.

mkdir ~/blender-git
cd ~/blender-git
git clone https://git.blender.org/blender.git
cd blender
git submodule update --init --recursive
git submodule foreach git checkout master
git submodule foreach git pull --rebase origin master

Once you have followed the steps above and checked out Blender's source code, you will probably want update it to the latest development version periodically.

This can be done with the following command (in ~/blender-git/blender/):

make update

For additional information on using Git with Blender's sources, see: Tools/Git