利用者:Kdawg/Building Blender/Install Git and download the Source
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:
- http://git-scm.com/docs/gittutorial
- http://www.vogella.com/tutorials/Git/article.html
- http://stackoverflow.com/tags/git/info
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. 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)
Arch
Red Hat
Fedora
|
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
Command Line
|
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>