392
edits
(Added git commands and fgdata.bundle) |
m (some corrections to the previous edit) |
||
Line 42: | Line 42: | ||
: the folder ''target'' will be created and a clone of the SimGear repo stored inside it. If no ''target'' is given the new folder's name is <code>simgear</code>. | : the folder ''target'' will be created and a clone of the SimGear repo stored inside it. If no ''target'' is given the new folder's name is <code>simgear</code>. | ||
<b><code>cd</code></b> into the new folder. You are then inside the ''working | <b><code>cd</code></b> into the new folder. You are then inside the ''working tree'' of this git repo. The repo itself is stored inside the subfolder <tt>.git</tt>, which we mustn't edit manually. Git will take care of that. | ||
;<code>git branch</code> | ;<code>git branch</code> | ||
: will show the active [[FlightGear_and_Git#Repositories and Branches|branch]]. Right after download this will be <tt>* next</tt>, that means the content of the ''working | : will show the active [[FlightGear_and_Git#Repositories and Branches|branch]]. Right after download this will be <tt>* next</tt>, that means the content of the ''working tree'' is the bleeding edge of SimGear's source code. | ||
:;<code>git branch -a</code> | :;<code>git branch -a</code> | ||
:: will list all branches of a git repository. The one marked with an asterisk (*) is the active one. | :: will list all branches of a git repository. The one marked with an asterisk (*) is the active one. | ||
;<code>git checkout master</code> | ;<code>git checkout master</code> | ||
: will change the active [[FlightGear_and_Git#Repositories_and_Branches|branch]] to <tt>master</tt>. Means, that the content of the ''working | : will change the active [[FlightGear_and_Git#Repositories_and_Branches|branch]] to <tt>master</tt>. Means, that the content of the ''working tree'' will be changed to that state. | ||
:;<code>git checkout v2.0.0</code> | :;<code>git checkout v2.0.0</code> | ||
Line 64: | Line 64: | ||
Except for the initial clone command this is identic to [[FlightGear_and_Git#Cloning_SimGear|Cloning SimGear]]. | Except for the initial clone command this is identic to [[FlightGear_and_Git#Cloning_SimGear|Cloning SimGear]]. | ||
;<code>git clone git://gitorious.org/fg/flightgear.git [target]</code> | ;<code>git clone git://gitorious.org/fg/flightgear.git [target]</code> | ||
To successfully compile <code>fgfs</code> | To successfully compile <code>fgfs</code> Flight- and SimGear's ''working tree'' must have the same state. | ||
==== Cloning fgdata ==== | ==== Cloning fgdata ==== | ||
At the time of writing the data repository is about 2.5 GB of size. Revisit an interrupted cloning of a repository is | At the time of writing the data repository is about 2.5 GB of size. Revisit an interrupted cloning of a repository is <b>not</b> possible with git. Therefore, if you have a slow or unstable connection to the internet, it is recommended to download the [[FlightGear_and_Git#fgdata.bundle|fgdata.bundle]]. | ||
Also have in mind, that the repository plus the ''working | Also have in mind, that the repository plus the ''working tree'' will be more than twice the size of the download on your local filesystem. | ||
There is neither a <tt>next</tt> branch nor any tags in that repository. If you want to | There is neither a <tt>next</tt> branch nor any tags in that repository. If you want to build FlightGear 2.0.0 you may fetch the data (FlightGear-data-2.0.0.tar.bz2) at one of the [http://flightgear.org/mirrors.html mirrors]. | ||
;<code>git clone git://mapserver.flightgear.org/fgdata/ [target]</code> | ;<code>git clone git://mapserver.flightgear.org/fgdata/ [target]</code> | ||
Line 79: | Line 79: | ||
==== | ==== Local Branch ==== | ||
To make individual changes, like adding/editing a joystick file to fgdata or patch the source code, it is recommended to create | To make individual changes, like adding/editing a joystick file to fgdata or patch the source code, it is recommended to create a local branch inside that repository: | ||
<b><code>cd</code></b> into the repositories folder, e.g. fgdata: | <b><code>cd</code></b> into the repositories folder, e.g. fgdata: | ||
;<code>git checkout -b master. | ;<code>git checkout -b master.local master</code> | ||
: a new branch <tt>master. | : a new branch <tt>master.local</tt> is created out of the <tt>master</tt> branch and set as the active one. You may apply your individual stuff there. | ||
To update that | To update that personal branch from the remote one do the following steps: | ||
git checkout master | git checkout master # switch to master branch | ||
git pull | git pull # update it | ||
git checkout master. | git checkout master.local # switch back to the individual branch | ||
git rebase | git rebase master # update it | ||
Line 99: | Line 99: | ||
: apply a patch to files and/or to the index http://www.kernel.org/pub/software/scm/git/docs/git-apply.html | : apply a patch to files and/or to the index http://www.kernel.org/pub/software/scm/git/docs/git-apply.html | ||
;<code>git checkout -f</code> | ;<code>git checkout -f</code> | ||
: | : may be used to throw away any local changes to the ''working tree''. Use with care, as any option that name is <tt>-f</tt> or <tt>--force</tt>, and only after reading <code>git checkout help</code>! | ||
=== fgdata.bundle === | === fgdata.bundle === | ||
For the FlightGear-data there are also bundles (snapshots) available that can be retrieved with your | For the FlightGear-data there are also bundles (snapshots) available that can be retrieved with your favourite download manager. This way you can resume interrupted downloads. After unpacking only a comparatively small amount of data has to be transferred from the git server to synchronize your repository. | ||
Download the bundle from | Download the bundle from |
edits