From BlenderWiki

Jump to: navigation, search
Note: This is an archived version of the Blender Developer Wiki. The current and active wiki is available on wiki.blender.org.

Install Git and download the Source

Git is a distributed revision control and source code management (SCM) system specifically designed to support distributed, non-linear workflows, like Blender. The purpose of this page is not to provide a comprehensive tutorial on using Git, rather it is simply how to install it so that you can download the source code and begin working on Blender. There are numerous tutorials/references available on the web, including:

Installing Git

Windows

You will need to download and install Git for Windows. This is needed in the Blender compiling process, see box below. If you just want a command line Git, then this is all you need.

If you want an easy to GUI that integrates with Windows Explorer, you can download TortoiseGit. This is the equivalent of TortoiseSVN.

Finally, the Cygwin unix environment should have a Git package available.

Exclamation mark.png
Revision information in splash: Make sure you have git.exe in your PATH when starting the build. It ensures you have it in your splash in the Blenders Python API part related to application info. If you fail to do so, you'll see UNKNOWN printed in the place of a revision hash and date.

Linux

Ubuntu, Mint, etc (Debian based distros)

Run the following commands in a terminal window:

sudo apt-get update
sudo apt-get install git build-essential

Or use your distribution's graphical package manager to install git and build-essential.

Arch

pacman -Sy
pacman -S git build-devel

Be sure to check the Archwiki on git for more information.

Red Hat

Nothing here yet! Contribute to the project and help us document this!

Fedora

Nothing here yet! Contribute to the project and help us document this!

Mac

If you will be using XCode for your development environment, Git should already be installed, and you have nothing to do here! Huzzah!

However, if you are using any other development environment, or if you simply want to ensure you have the most recent version available, you can get it here: http://git-scm.com/download/mac

Download the source code repository

It is highly recommended that you use the default file locations for everything until you have a good feel for where things will go.

Windows

TortoiseGit

Nothing here yet.

Command Line

From the command line, run the following commands:

mkdir C:\blender-dev
cd C:\blender-dev
git clone git://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

Linux & Mac

Open a terminal window and run the following commands:

mkdir ~/src
mkdir ~/src/blender-dev
cd ~/src/blender-dev
git clone http://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


Keeping your repository updated

If you would like to keep your local repository updated with the most recent changes, type the following lines in your terminal window from your blender-dev/blender folder:

git pull --rebase
git submodule foreach git pull --rebase origin master

Of course, you can always add these to a batch/script file and automate that.

Other useful git commands

Some basic git commands to commit, diff, patch, etc, will go here.

git clone <repo> <directory>