652
edits
(General review to try making it simpler for "newbies in design". Part 1 = up to creating local master --> will be continued) |
m (Still Updating, Part 2 till Editing ready) |
||
Line 53: | Line 53: | ||
* getstart | * getstart | ||
* etc. | * etc. | ||
Create your own "GIT-Clone" ''(as space to work in)'' by activating the "Clone repository" button of the wanted project. | Create your own "GIT-Clone" ''(as a space to work in)'' by activating the "Clone repository" button of the wanted project. By default you will be cloning the '''''next''''' branch of that project --> that is the actual repository including the newest, not yet formally distributed, changes. That is probably what you want if you want to | ||
By default you will be cloning the | |||
* assist with reporting bugs before they are released as a proper release version | * assist with reporting bugs before they are released as a proper release version | ||
* or participate in the design | * or participate in the design | ||
Line 61: | Line 59: | ||
If you are interested in other branches/versions see the button "Source Tree". | If you are interested in other branches/versions see the button "Source Tree". | ||
But '''''keep in mind:''''' To successfully compile <code>fgfs</code> Flight- and SimGear's ''working tree'' must have the same state! | |||
The created GIT- | The created GIT-clone will be '''https://gitorious.org/~YourUID''' | ||
<small>''("YourUID" being your ID you logged in with, and do not forgett the "~" in front of it!)''</small) | <small>''("YourUID" being your ID you logged in with, and do not forgett the "~" in front of it!)''</small>) | ||
=== C) Create a "master" on your local PC === | === C) Create a "master" on your local PC === | ||
''All the following is shown as performed in an UBUNTU "Terminal" environment! Please adapt especially the directory trees according to your Operating-System!'' | |||
# Create a unique folder on your PC, e.g. "..'''\GIT'''" | # Create a unique folder on your PC, e.g. "..'''\GIT'''" | ||
# change into that folder and use the "git clone" commands to clone the wanted repository | # change into that folder and use the "git clone" commands to clone the wanted repository | ||
# | #* ''if you need/want more informations about those commands, input "git help [command]"'' <small>(e.g. "git help clone")</small>) | ||
# use one of the following commands (or similar) from within that GIT-folder: | # use one of the following commands (or similar) from within that "..'''\GIT'''"-folder: | ||
:*for cloning '''''SimGear''''' use: | |||
::'''<nowiki>git clone git://gitorious.org/fg/simgear.git</nowiki>''' [target] | |||
::<small>To successfully compile <code>fgfs</code> Flight- and Sim-Gear's ''working tree'' they both must have the same state.</small> | |||
:*for cloning '''''FlightGear''''' use: | |||
::'''<nowiki>git clone git://gitorious.org/fg/flightgear.git</nowiki>''' [target] | |||
::<small>To successfully compile <code>fgfs</code> Flight- and Sim-Gear's ''working tree'' they both must have the same state.</small> | |||
''' | :*for cloning '''''fgdata''''' use: | ||
::'''<nowiki>git clone git://gitorious.org/fg/fgdata.git</nowiki>''' [target] | |||
:By executing one of the above commands the folder ''target'' will be created and a clone will be stored inside it. If no ''target'' is given the new folder's name is the GIT-name <small>''(i.e.: "simgear", "flightgear", "fgdata")''</small>. | |||
: will | |||
: | |||
'''<code>cd</code>''' into the new folder [target] | |||
: | :You are now 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> | |||
: will show the active [[FlightGear and Git#Repositories and Branches|branch]]. e.g. | |||
: | <small> | ||
..GIT/fgdata$ git branch | |||
* master | |||
master.local <small>''(<-- this will not be there initially!)''</small> | |||
..GIT/fgdata$ | |||
:</small>Right after download this will be the GIT-repository-branch <tt>'''"next"'''</tt>, which on your PC is called "master". The "'''*'''" in front means that this is now the active one! i.e. the content of the active ''working tree'' is the bleeding edge of the source code. | |||
;<code>git | ;<code>git branch -a</code> | ||
: will | : will list '''''all''''' branches of a git repository. The one marked with an asterisk (*) is the active one. e.g.: | ||
<small> | |||
..GIT/fgdata$ git branch -a | |||
* master | |||
master.local <small>''(<-- this will not be there initially!)''</small> | |||
remotes/origin/HEAD -> origin/master | |||
remotes/origin/PRE_OSG_PLIB_20061029 | |||
remotes/origin/Short_Empire-public | |||
remotes/origin/Work | |||
remotes/origin/master | |||
remotes/origin/release/2.4.0 | |||
remotes/origin/release/2.6.0 | |||
remotes/origin/releases/2.2.0 | |||
..GIT/fgdata$ | |||
</small> | |||
You now have your local "GIT-master". | |||
'''But:''' To make individual changes, like editing a joystick file, add a plane to fgdata or patch the source code, it is recommended to create a local branch inside that repository. In the chapter [[FlightGear and Git#D) Editing Data|D) Editing Data]] we will describe a way to achieve this. But have in mind, that this is very basic and only suits for users who have minor changes. | |||
==== | ==== Special for '''fgdata''':==== | ||
At the time of writing the data repository is about ''3.4 GB''. Continuing an interrupted cloning of a repository is '''not supported''' 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]]. | At the time of writing the data repository is about ''3.4 GB''. Continuing an interrupted cloning of a repository is '''not supported''' 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 tree'' will be more than twice the size of the download on your local filesystem. | 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 build FlightGear 2.0.0 you | There is neither a <tt>"next"</tt> branch nor any tags in that repository. If e.g. you want to build FlightGear 2.0.0 you must fetch the data (FlightGear-data-2.0.0.tar.bz2) at one of the [http://flightgear.org/mirrors.html mirrors]. | ||
==== fgdata.bundle ==== | ==== fgdata.bundle ==== | ||
Line 139: | Line 152: | ||
You should be suspicious if based on the printed progress you estimate the data download during the fetch will exceed 1GB (assuming the bundle is not terribly outdated). | You should be suspicious if based on the printed progress you estimate the data download during the fetch will exceed 1GB (assuming the bundle is not terribly outdated). | ||
=== D) Editing Data === | |||
:;<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 tree'' will be changed to that state. | |||
:;<code>git checkout v2.0.0</code> | |||
:: will activate the state of the code inside the <tt>master</tt> branch at the time FG 2.0.0 was released. | |||
:;<code>git tag</code> | |||
:: will show all tags of the history of the active branch. | |||
;<code>git pull</code> | |||
;<code>git | : will update the local repo from the remote one. | ||
: | |||
one. You may now apply your individual stuff there and start FlightGear to verify the changes are proper. | |||
If you conclude they are, you have to tell git about those changes: | If you conclude they are, you have to tell git about those changes: | ||
Line 156: | Line 176: | ||
: If git finds more than one ''untracked'' file/path, it will give you a numbered list and prompt to select which ones should be added. An empty input will exit this mode. See "Interactive mode" in [http://www.kernel.org/pub/software/scm/git/docs/git-add.html man git add] for more details. | : If git finds more than one ''untracked'' file/path, it will give you a numbered list and prompt to select which ones should be added. An empty input will exit this mode. See "Interactive mode" in [http://www.kernel.org/pub/software/scm/git/docs/git-add.html man git add] for more details. | ||
: '''<tt>[u]pdate</tt>''' is the next step and will update the altered and ''tracked'' files to the index in the same manner as explained in <tt>add</tt> untracked paths above. | : '''<tt>[u]pdate</tt>''' is the next step and will update the altered and ''tracked'' files to the index in the same manner as explained in <tt>add</tt> untracked paths above. | ||
;<code>git commit</code> | ;<code>git commit</code> | ||
: will commit the ''indexed'' updates to the ''master.local'' branch. It opens a list of the updates in your standard editor. You may add a comment to that file describing the object of the commit. Save and exit the editor. You have now committed your changes inside the ''working tree'' to your personal branch. | : will commit the ''indexed'' updates to the ''master.local'' branch. It opens a list of the updates in your standard editor. You may add a comment to that file describing the object of the commit. Save and exit the editor. You have now committed your changes inside the ''working tree'' to your personal branch. |
edits