Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 1 and Version 2 of code/tools/Git


Ignore:
Timestamp:
Jun 15, 2010, 4:26:43 PM (14 years ago)
Author:
adrfried
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/tools/Git

    v1 v2  
    44
    55== Initial Checkout ==
     6
     7=== Directly from SVN ===
    68
    79To checkout orxonox' [wiki:SVN]-Repository in Git use:
     
    1113}}}
    1214
    13 This will check out the whole history of the Project code with all the branches and tags, it will use about 150 MB of disk space and it may take a long time (while checking out it will use more disk space, until things get automatically compressed by {{{git gc}}}).
     15This will check out the whole history of the Project code with all the branches and tags, it will use about 150 MB of disk space and it '''may take a long time''' (while checking out it will use more disk space, until things get automatically compressed by {{{git gc}}}).
     16
     17{{{--stdlayout}}} tells git-svn to follow the common "trunk/branches/tags" layout. {{{--prefix=svn/}}} prefixes the remote branches with svn/, similar to the usual origin/, otherwise you would not be able to have a local branch with the same name as in svn.
     18
     19=== via Adi's git repository ===
     20
     21Alternatively you can clone from Adi's git repository on his Tardis account which is '''much faster'''. This requires SSH access on Tardis.
     22
     23{{{
     24mkdir orxonox
     25cd orxonox
     26# we are not using git clone here, because we want to track some other references
     27git init
     28# omit the host name and the colon if you are doing this on a Tardis computer
     29git remote add origin tardis-c07.ee.ethz.ch:/home/adrfried/orxonox.git
     30git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
     31git fetch
     32# check out trunk as master
     33git checkout -b master svn/trunk
     34# initialize git-svn
     35git svn init --stdlayout --prefix=svn/ https://svn.orxonox.net/game/code
     36# get the latest changes from svn
     37git svn rebase
     38}}}
    1439
    1540== Basic Configuration ==
     
    2853}}}
    2954
    30 The --global argument tells git to store the config in .gitconfig in your home, so these will be usable for every git repository you have.
     55The {{{--global}}} argument tells git to store the config in .gitconfig in your home, so these will be usable for every git repository you have.
    3156
    3257Add something like this to your .bashrc for having a nice, git-aware bash prompt, which shows the current branch you are on and sometimes some other stuff:
     
    5378== Branches ==
    5479
    55 TBD.
     80To checkout another branch than trunk, e.g. the presentation branch use:
     81{{{
     82git checkout -b presentation3 svn/presentation3
     83git svn rebase
     84}}}
     85This will create a local branch named presentation3.
     86You can simply switch between local branches with {{{git checkout <branch>}}}
    5687
    5788== Documentation ==