利用者:Ideasman42/GitBlender
目次
GitBlender
This document explains how to make a gitorious mirror of git.blender.org so you can develop in your own repository.
In summary, this explains how to push an existing copy of blenders source into a new git repository and keep it in sync with blender.org.
Note: This document assumes you know how to do git basics (push/pull/commit), if not, read this first.
http://wiki.blender.org/index.php/Dev:Doc/Tools/Git
Create Repository
First create a new repository from gitorious's web interface, once done you will have the text:
Congratulations on your new repository!
One of the commands under the 'Push your changes' heading will look something like:
git remote add origin git@gitorious.org:my_blender/my_blender.git
DO NOT RUN THIS COMMAND, but note the URL at the end since we'll be using it later.
Upload Blenders Repository
The next step, is to take a copy of an existing blender clone, and point it to your new repository.
If you dont have a git clone of blenders source code from git, you'll need to make one first.
See: http://wiki.blender.org/index.php/Dev:Doc/Tools/Git#Repository_Download
Make a copy of this directory, and, using the command line set the upstream.
git remote set-url origin git@gitorious.org:my_blender/my_blender.git
note, unlike the command above - this replaces the origin with your own.
Upload (Push Repository)
Now you want to upload your git repisoty, so this is simply done with;
git push --mirror
this may take some time since its uploading ~230mb.
Now you can use your git repository, commit, push, pull etc. as a first class citizen.
Sync with blender.org
Most likely you will want to sync up with blender once in a while.
To do this its easiest to add blender.org as a remote, so you can reference quickly.
This adds the remote, note that bf can be any alias you like.
git remote add bf http://git.blender.org/blender.git
This command only has to be run once, and the remote is stored in your clone for reuse.
Other Examples
Now to sync with git.blender.org:
git pull bf master
Now to push the changed to your own repo:
git push
To do a see a diff with blender.org and your own repository:
git fetch bf git diff bf/master