HowTo:Checkout GIT

From VsWiki
Revision as of 13:29, 24 December 2010 by Breese (talk | contribs) (Initial version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page describes how to use GIT with the Vega Strike SVN repository.

GIT is a distributed sourcecode revision control system, which allows you to commit changes to a local repository and from there commit the changes to the remove Vega Strike SVN repository. This is useful if you want to experiment with the codebase, or if you do not have commit privileges to the Vega Strike SVN repository.

If you are unfamiliar with GIT, the you should start by reading the GIT SVN Crash Course.


Installation

First you need to install the GIT and GIT-SVN packages. How you do this, depends on your system.

See the chapter 2 in the GIT Book.


Set up

After installing the two packages above, you have to set up a local git repository for the Vega Strike codebase.

Normally git-svn will copy the full svn repository, that is all revisions of all files. This takes takes a long time, and as you seldomly need the full history, you can instead copy from a given revision onwards.

This command will only copy the most recent revision. If you want the full history, remove the "-rHEAD" option:

git svn clone -rHEAD https://vegastrike.svn.sourceforge.net/svnroot/vegastrike/trunk/vegastrike/

Next you need to handle svn:externals. You can find them with "git svn show-externals". There may be a better way using git submodules, but this works:

git svn clone -rHEAD http://svn.boost.org/svn/boost/tags/release/Boost_1_28_0/boost/boost/ boost/1_28/boost
git svn clone -rHEAD http://svn.boost.org/svn/boost/tags/release/Boost_1_28_0/boost/libs/python/src/ boost/1_28/src
git svn clone -rHEAD http://svn.boost.org/svn/boost/tags/release/Boost_1_35_0/boost/ boost/1_35/boost
git svn clone -rHEAD http://svn.boost.org/svn/boost/tags/release/Boost_1_35_0/libs/python/src/ boost/1_35/src

Now you are almost ready to work on the codebase. You just need to create a branch to work on. This will make it easier to keep your local GIT repository synchonized with the remote SVN repository.

git branch insert-your-branch-name
git checkout insert-your-branch-name

Replace insert-your-branch-name with the name that you want to call your branch.

From here on, you can follow the normal build instructions.