FlightGear Git: Difference between revisions

Jump to navigation Jump to search
1,128 bytes removed ,  10 May 2012
Small cleanup
mNo edit summary
(Small cleanup)
Line 2: Line 2:
'''Git''' is a version control system used by the [[FlightGear]] project to store all of the files required to build FlightGear, as well as data (mainly [[aircraft]]). Git tracks updates to every file as developers around the world work together concurrently to create new versions.  
'''Git''' is a version control system used by the [[FlightGear]] project to store all of the files required to build FlightGear, as well as data (mainly [[aircraft]]). Git tracks updates to every file as developers around the world work together concurrently to create new versions.  


While new FlightGear features and additions are in development, they are available from Git before they are available in the standard release version. Using Git allows a user to build the newest possible version of FlightGear from the latest source files, to experiment with new aircraft or other features. However, it's not a beginner's tool. Using Git can expose the user to unstable features that show ugly error messages, or crash the computer.  
While new FlightGear features and additions are in development, they are available from Git before they are available in the standard release version. Using Git allows users to build the newest possible version of FlightGear from the latest source files, to experiment with new aircraft or other features. However, it's not a beginner's tool. Using Git can expose the user to unstable features that show ugly error messages, or crash the computer.  


In May 2010, after a hardware failure on the [[CVS]] servers, the FlightGear project changed version control system from CVS to Git. The Git repositories are located at [http://gitorious.org/fg Gitorious] and at the [http://mapserver.flightgear.org/git/?p=fgdata;a=summary Mapserver].
In May 2010, after a hardware failure on the [[CVS]] servers, the FlightGear project changed version control system from CVS to Git. The Git repositories are located at [http://gitorious.org/fg Gitorious] and a mirror is hosted at the [http://mapserver.flightgear.org/git/?p=fgdata;a=summary Mapserver].


Due to the "recent" switch, we are currently doing our best on providing manuals for obtaining FlightGear through Git. The following articles are work in progress:
Due to the "recent" switch, we are currently doing our best on providing manuals for obtaining FlightGear through Git. The following articles are work in progress:
Line 11: Line 11:


== Motivation ==
== Motivation ==
Much has been written on the advantages of Git over CVS. For us, some advantages are:
Much has been written on the advantages of Git over CVS. For the FlightGear project, some advantages are:
* Much better support for branches and merging branches. This is especially important for creating bug-fix releases for major releases while still allowing work on the next major release to continue. It is also very nice for a developer's personal workflow.
* Much better support for branches and merging branches. This is especially important for creating bug-fix releases for major releases while still allowing work on the next major release to continue. It is also very nice for a developer's personal workflow.
* Easier path for contributors to submit changes and developers to integrate them;
* Easier path for contributors to submit changes and developers to integrate them.
* Much better support for everyday tasks like searching the project history for changes, viewing changes, bisecting the project history to find the original source of a bug.
* Much better support for everyday tasks like searching the project history for changes, viewing changes, bisecting the project history to find the original source of a bug.


Also, as noted before, the CVS servers had a hardware failure on May 2010, speeding up FlightGear's change to Git.
Also, as noted before, the CVS servers had a hardware failure on May 2010, speeding up FlightGear's change to Git.


 
== Repositories and branches ==
== Repositories and Branches ==
For historical reasons there continue to be separate repositories for [[SimGear]] and FlightGear '''source'''. For most users and developers the most interesting ones of each are:
For historical reasons there continue to be separate repositories for SimGear and FlightGear '''source'''. For most users and developers the most interesting ones of each are:


* <tt>next</tt> The current tip of new development. This branch should always compile and run, but various things could be broken.
* <tt>next</tt> The current tip of new development. This branch should always compile and run, but various things could be broken.
Line 27: Line 26:
* <tt>master</tt> The tip of stable, tested new features. If we were to make a new release today, we would start from the tip of this branch. New features that have been "cooking" in the <tt>next</tt> branch for a few days or weeks will be merged here.
* <tt>master</tt> The tip of stable, tested new features. If we were to make a new release today, we would start from the tip of this branch. New features that have been "cooking" in the <tt>next</tt> branch for a few days or weeks will be merged here.
* <tt>maint</tt> Bug fixes for the most recently released Flightgear. When a release is made from <tt>master</tt>, this branch is reset to it.
* <tt>maint</tt> Bug fixes for the most recently released Flightgear. When a release is made from <tt>master</tt>, this branch is reset to it.


FlightGear '''data''''s branches of interest are:
FlightGear '''data''''s branches of interest are:
Line 33: Line 31:
* <tt>release/*</tt> Same as for the source.
* <tt>release/*</tt> Same as for the source.


 
This arrangement follows the scheme used by the Git maintainers. [http://www.kernel.org/pub/software/scm/git/docs/howto/maintain-git.txt This description] is very technical; you will surely have achieved git-fu if completely understand it. However, the idea of maintaining several branches of different stability is common in collaborative software projects.
This arrangement follows the scheme used by the Git maintainers.
[http://www.kernel.org/pub/software/scm/git/docs/howto/maintain-git.txt This description] is very technical; you will surely have achieved git-fu if completely understand it. However, the idea of maintaining several branches of different stability is common in collaborative software projects.
 


== Clone and handle Repositories ==
== Clone and handle Repositories ==
Line 46: Line 41:


By default you will be checking out the <tt>next</tt> branch of SimGear and FlightGear and the <tt>master</tt> branch of FGData. This is probably what you want if you want to assist with reporting bugs and the like before they are release as a proper release version.
By default you will be checking out the <tt>next</tt> branch of SimGear and FlightGear and the <tt>master</tt> branch of FGData. This is probably what you want if you want to assist with reporting bugs and the like before they are release as a proper release version.


=== For dummies ===
=== For dummies ===
Some basic git commands on how to clone, update and handle local git repositories. Except the initial ''git clone'' for each repository all commands have to be executed from within the ''target'' folder.<br />
Some basic git commands on how to clone, update and handle local git repositories. Except the initial ''git clone'' for each repository all commands have to be executed from within the ''target'' folder.


==== Cloning SimGear ====
==== Cloning SimGear ====
Line 72: Line 66:
;<code>git pull</code>
;<code>git pull</code>
: will update the local repo from the remote one.
: will update the local repo from the remote one.


==== Cloning FlightGear ====
==== Cloning FlightGear ====
Line 90: Line 83:
'''<code>cd</code>''' into the new directory and verify it's state with '''<code>git branch</code>'''. If it isn't <tt>* master</tt>, do a '''<code>git checkout master</code>'''.
'''<code>cd</code>''' into the new directory and verify it's state with '''<code>git branch</code>'''. If it isn't <tt>* master</tt>, do a '''<code>git checkout master</code>'''.


 
==== Local branch ====
==== Local Branch ====
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. The following commands 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.
To make individual changes, like editing a joystick file or add a plane to fgdata or patch the source code, it is recommended to create a local branch inside that repository. The following commands 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.


'''<code>cd</code>''' into the repositories folder, e.g. fgdata:
'''<code>cd</code>''' into the repositories folder, e.g. fgdata:
Line 146: Line 138:
Do the following steps to extract the bundle and bring the repository up to date:
Do the following steps to extract the bundle and bring the repository up to date:
  $ git clone fgdata.bundle fgdata
  $ git clone fgdata.bundle fgdata
Initialized empty Git repository in fgdata/.git/
warning: unrecognized header: -deg" - /orientation/roll += "-deg" - /position/altitude += "-ft" - /position/altitude-agl += "-ft" - /position/latitude += "-deg" - /position/longitude += "-deg" [...]
  $ cd fgdata
  $ cd fgdata
  $ git checkout -b master-tmp
  $ git checkout -b master-tmp
Line 154: Line 144:
  $ git remote add origin git://gitorious.org/fg/fgdata
  $ git remote add origin git://gitorious.org/fg/fgdata
  $ git fetch origin
  $ git fetch origin
remote: Counting objects: 5011, done.
remote: Compressing objects: 100% (2206/2206), done.
remote: Total 3512 (delta 1948), reused 2321 (delta 1239)
Receiving objects: 100% (3512/3512), 161.20 MiB | 474 KiB/s, done.
Resolving deltas: 100% (1948/1948), completed with 698 local objects.
From git://gitorious.org/fg/fgdata
  * [new branch]      PRE_OSG_PLIB_20061029 -> origin/PRE_OSG_PLIB_20061029
  * [new branch]      master    -> origin/master
  * [new branch]      releases/2.2.0 -> origin/releases/2.2.0
  * [new tag]        last-cvs  -> last-cvs
  * [new tag]        mapserver  -> mapserver
From git://gitorious.org/fg/fgdata
  * [new tag]        last-cvs  -> last-cvs
  * [new tag]        mapserver  -> mapserver
  $ git branch --track master origin/master
  $ git branch --track master origin/master
Branch master set up to track remote branch refs/remotes/origin/master.
  $ git checkout master
  $ git checkout master
Checking out files: 100% (1117/1117), done.
Switched to branch 'master'
  $ git branch -D master-tmp
  $ git branch -D master-tmp
Deleted branch master-tmp.


If you get an error at '''<code>git fetch origin</code>''' try:
If you get an error at '''<code>git fetch origin</code>''' try:
Line 221: Line 193:
* [http://sourceforge.net/projects/qgit qgit - interactive git repository viewer and frontend]
* [http://sourceforge.net/projects/qgit qgit - interactive git repository viewer and frontend]
* Additional [[Resources WRT running git on Win32]]
* Additional [[Resources WRT running git on Win32]]


{{Building}}
{{Building}}


[[Category:Core developer documentation]]
[[Category:FlightGear]]
[[Category:FlightGear]]
[[Category:Core developer documentation]]

Navigation menu