Board index FlightGear Support Installation Windows

How to GIT

Installing FlightGear, scenery, aircraft etc. on Windows.

How to GIT

Postby Zexe » Mon May 31, 2010 9:56 am

I have been struggling to find information on how to clone the fgdata. Just heard from Vivian that the fgdata is such a huge file that it is difficult to download everything in one sitting. Vivian also informed my that Timoore had a fix for this, but has yet to post it on the fg wiki GIT page.

I have come across several FG wiki articles for GIT, from debian to OSX installation, and some others. However, I am unsuccessful at DL the fgdata. It seems as though the DL stops at 50% after leaving my PC on for about 16hrs straight. This also makes me wonder if I did the right thing...also the wiki articles aren't specific enough when you run into an issue.

Just wondering if I did the correct thing by DL tortoiseGIT and GIT, then opened GIT bash and typed in git clone git://gitorious/fg/fgdata.git. Saw things happening, but the DL was extremely slow and then just stopped at 50%.

Also, is there a good updated page on how to GIT? Hopefully, this could be the thread for the official 'How to GIT' seeming that the search doesn't show anything of such sort. And maybe future GITters can use this thread.
Zexe
AIRPORTS: CYYJ, KHAF, RJTT, KEYW
PLANES: m33, grob115, pa22, Goose, MD-81, Velocity-XL, Rallye, F-5E Tiger II, Bocian,
User avatar
Zexe
 
Posts: 187
Joined: Thu May 21, 2009 7:12 am

Re: How to GIT

Postby Gijs » Mon May 31, 2010 3:44 pm

Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9374
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: How to GIT

Postby rsotaccs » Mon May 31, 2010 3:56 pm

There are 2 pages about this. The one Gijs mentioned and "FlightGear and Git".
Active again! Sometimes... // BRASIL
rsotaccs
 
Posts: 110
Joined: Sun Dec 13, 2009 3:50 pm
Callsign: PT-RSB
IRC name: PT-RSB
Version: 111219
OS: Win7 x64

Re: How to GIT

Postby Zexe » Mon May 31, 2010 4:32 pm

Gijs wrote:http://wiki.flightgear.org/index.php/FlightGear_Git_on_Windows :)

Hey Gijs, I followed those directions very well and that's when my DL stopped at 50%. The DL rate decreased down to around 26kbs. At the moment I am downloading and has only DL 29%. I will keep DL until the morning.
Zexe
AIRPORTS: CYYJ, KHAF, RJTT, KEYW
PLANES: m33, grob115, pa22, Goose, MD-81, Velocity-XL, Rallye, F-5E Tiger II, Bocian,
User avatar
Zexe
 
Posts: 187
Joined: Thu May 21, 2009 7:12 am

Re: How to GIT

Postby Zexe » Tue Jun 01, 2010 6:48 am

Zexe wrote:
Gijs wrote:http://wiki.flightgear.org/index.php/FlightGear_Git_on_Windows :)

Hey Gijs, I followed those directions very well and that's when my DL stopped at 50%. The DL rate decreased down to around 26kbs. At the moment I am downloading and has only DL 29%. I will keep DL until the morning.



EDIT: So after restarting the download, I got a fatal error of some sort asking me to do something with a y/n. I gave up and pressed n several times. Such as shame this happened. As I wrote in my first post, i took a look at most of the articles written on GIT for FG. So, referring me back to those pages doesn't seem to quite work. :) When I have more time, I will print screen exactly what the fatal error was about.
Zexe
AIRPORTS: CYYJ, KHAF, RJTT, KEYW
PLANES: m33, grob115, pa22, Goose, MD-81, Velocity-XL, Rallye, F-5E Tiger II, Bocian,
User avatar
Zexe
 
Posts: 187
Joined: Thu May 21, 2009 7:12 am

Re: How to GIT

Postby nickyivyca » Wed Jun 02, 2010 7:13 am

Zexe wrote:
Gijs wrote:http://wiki.flightgear.org/index.php/FlightGear_Git_on_Windows :)

Hey Gijs, I followed those directions very well and that's when my DL stopped at 50%. The DL rate decreased down to around 26kbs. At the moment I am downloading and has only DL 29%. I will keep DL until the morning.

Exact same thing happened to me. Except at around 10%. :?
Personal Fleet: 787-8, CRJ-200, 737-300, MD-81, DHC-3A, Beechcraft Starship
New hangar!
Curent projects: New 787, New CRJ-200, DC-9, New 777-200ER FDM
User avatar
nickyivyca
 
Posts: 1254
Joined: Tue Dec 29, 2009 5:42 am
Location: Near KSFO, closer to KPAO
Callsign: Nick, ---206
Version: 2
OS: Win 7 (64)

Re: How to GIT

Postby Arthur Maiden » Tue Aug 31, 2010 10:48 am

i also come to problems cloning the GIT repository at git://mapserver(dot)flightgear(dot)org/fgdata/
i reach about 10-19% of the download and it stalls one me, says the download is running at 143kbps but doesn't change how much data i have already got

Windows Vista Home Premium
mysysGIT 1.7.0.2
FGUK - A FlightGear community in the United Kingdom and Republic of Ireland
Callsign: G-PHEN
AVA Callsign: AVA0016 - RETIRED
The development of the S92 has infected my Avatar...
User avatar
Arthur Maiden
 
Posts: 680
Joined: Sat Oct 03, 2009 10:42 pm
Callsign: G-PHEN
Version: GIT
OS: Vista, Ubuntu 10.04

Re: How to GIT

Postby Jester » Tue Aug 31, 2010 10:42 pm

Use the provided git bundle. See the wiki for details.
Jester
 
Posts: 1191
Joined: Wed Feb 28, 2007 3:53 pm
Location: Hungary
Callsign: BA996,Rescue1
IRC name: Jester01
Version: GIT
OS: Debian Linux

Re: How to GIT

Postby Thorsten » Wed Sep 01, 2010 7:22 am

Hooray asked me to make this instruction email which he sent me a while ago available in public:

Hooray wrote:It's really just a handful of commands that you need to know in the beginning:

  • git init NAME - to create a completely new empty repository (will not be needed for FG, just for experiments/testing)
  • git clone URL - to create a copy of a git repository locally (that's what you have done already to get the fgdata repository)

  • git status - to view the status of the current repository
  • git diff - to view differences
  • git pull - to pull (=download AND merge!) latest updates from the repository that was used for cloning (for updating the local master branch using the origin)
  • git branch - to show active branch and display list of other local branches
  • git branch NAME - to create a new branch using NAME (branch=working copy)
  • git checkout NAME - to checkout a certain branch (i.e. switch to that branch, make it active)
  • git add NAME - to specify which new or modified files shall be added to the next commit (wildcards supported)
  • git commit -M "COMMENT" - commit all files that you previously added using "git add" and add a short comment about your work

Because creating a new branch and checking it directly afterwards out, is such a common operation there is a short cut available:
git checkout -b my-branch


To update the base package use "git pull" (issued in $FG_ROOT) on the UNMODIFIED master branch (which is the default).

This will then keep the "master" branch updated.
To get a list of local branches use "git branch". This will also tell you what branch you are currently on.

However, assuming that you modify your base package for your own work, it will indeed be better to do this in another branch (i.e. a topic branch), otherwise your own modifications may conflict with the checkout from the server, once you do a git pull so that you will have to manually merge everything. Make sure to use use "git status" and/or "git diff" on the master branch to see if you have already done any modifications that may complicate the update.

The easiest thing to do would indeed be to locally create a branch of $FG_ROOT, where you save all your work, this can be done using "git branch BRANCHNAME", where BRANCHNAME could for example be "local-weather". So just enter the base package folder and type "git branch local-weather", you should really be doing this only with a clean/unmodified master branch.

Once you issue then another "git branch", you'll see your newly created "local-weather" branch in the list of local branches.

To switch to this new branch use "git checkout local-weather", that may take a second or two given the sheer size of the base package. Then you have a 1:1 copy of the last version of the master branch for doing your own local work. This is why I suggested not to create a branch from a modified master, because it will be more complicated to update it automatically.

Basically: always leave the master branch alone, and only do work on topic branches, so that you can easily update the master branch.

For adding modifications/files to your own topic branches, simply use "git add filename".
And when you are finished with a change, use "git commit" to commit your modification to your topic branch.

And whenever you want to update your base package, you change back to the master branch using "git checkout master".
Keep in mind that the branch you are on is also having an effect on what fgfs sees, because git will literally checkout a copy from the branch, so don't be surprised when your updated work is suddenly not shown in FG, because then you may find that you are still on the default master branch.

Instead of directly doing all this with the base package, I would spend 30 minutes playing with the basics, just by creating a new folder, where you play with modifying a simple text file (think Nasal script) and create branches of it. That is really the easiest way to understand the underlying concepts, without frustrating experiences.

Just do something like this
Code: Select all
mkdir gitlearn
cd gitlearn
git init
git branch

echo "Hello World" > hello.txt
git add hello.txt
git commit -m "My first commit"

git branch new-version
git checkout new-version

echo "Hello World Ver. 2" > hello.txt
git add hello.txt
git commit -m "Second version of my program"

git checkout master
git diff new-version



As you'll see, it's fairly easy to do, but it is important not to start with a real project right from the beginning, but instead become familiar with everything first.

Once you understand these basics, I would however suggest to play with modifying and maintaining your scripts in git, it really is fairly and gives you hands on experience, just make sure that it is a copy of the script that you play with first.

For some simple step by step tutorials you may want to check out:
http://nakedstartup.com/2010/04/simple- ... -workflow/
http://www.spheredev.org/wiki/Git_for_t ... ur_project
http://www.kernel.org/pub/software/scm/ ... orial.html


There are obviously many more advanced topics, but this bunch of 3-5 commands should get you going pretty quickly,
things become slightly more interesting, once you want to directly commit to a remote repository or once you need to track and merge multiple branches.

Here's a link to online screencasts about doing specific tasks using git: http://gitcasts.com/

Here is a bunch of fairly simple beginner tutorials for using git (increasing complexity):

http://hoth.entp.com/output/git_for_designers.html
http://redlinernotes.com/blog/?p=1121
http://stackoverflow.com/questions/3159 ... ical-guide
https://git.wiki.kernel.org/index.php/G ... ow_do_I_...
http://cworth.org/hgbook-git/tour/
http://ktown.kde.org/~zrusin/git/git-ch ... medium.png
http://www.kernel.org/pub/software/scm/ ... ryday.html
http://rubybrothers.ru/assets/2008/10/2 ... ntable.pdf
http://jan-krueger.net/wordpress/wp-con ... eet-v2.zip
http://ftp.newartisans.com/pub/git.from.bottom.up.pdf
Thorsten
 
Posts: 11997
Joined: Mon Nov 02, 2009 8:33 am

Re: How to GIT

Postby Arthur Maiden » Wed Sep 01, 2010 12:17 pm

thanks but it appeared that all i needed was patience and a decent internet connection...
i let it run overnights so there would hopefully be no interuptions in the download process, downloaded the binary this morning... :D :D
FGUK - A FlightGear community in the United Kingdom and Republic of Ireland
Callsign: G-PHEN
AVA Callsign: AVA0016 - RETIRED
The development of the S92 has infected my Avatar...
User avatar
Arthur Maiden
 
Posts: 680
Joined: Sat Oct 03, 2009 10:42 pm
Callsign: G-PHEN
Version: GIT
OS: Vista, Ubuntu 10.04

Re: How to GIT

Postby YourDailyTsunami » Sun Oct 10, 2010 4:58 pm

ok, I've run into some problems with msysgit:
1) contrary to what the fgwiki says, there is no "GitBash" option once I installed it. Rebooting didn't help the problem
2) once I've closed the git console after install I can't reopen it. There are about 20 .exe's in the binary folder but none of them seems to be a launcher???

I'd really appreciate your help here since I'm completely stuck with it!
all the booze is free, airline goin' broke, here come the ladies with another jack'n'coke... :P
YourDailyTsunami
 
Posts: 584
Joined: Wed Dec 12, 2007 7:01 pm
Location: Europe, mostly
Callsign: Tsunami

Re: How to GIT

Postby AndersG » Sun Oct 10, 2010 5:38 pm

YourDailyTsunami wrote:ok, I've run into some problems with msysgit:
1) contrary to what the fgwiki says, there is no "GitBash" option once I installed it. Rebooting didn't help the problem
2) once I've closed the git console after install I can't reopen it. There are about 20 .exe's in the binary folder but none of them seems to be a launcher???

I'd really appreciate your help here since I'm completely stuck with it!


AFAIK git doesn't have a launcher (maybe something called git-gui, though?). The "Git Bash" option is a "plug-in" (or whatever it is called) to the file system explorer - it worked fine when I installed msysgit - but I guess various other such plug-in software could conflict with it.
You can also use git from cmd.exe or Windows PowerShell - just make sure the git .exe:s are in the program search path. When I installed msysgit the installer offered me the option to add them to the path, with the result that I can use git in the same way as I do on Linux.

Cheers,

Anders
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2465
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: How to GIT

Postby Hooray » Wed Dec 01, 2010 8:26 pm

There are actually a number of separate GUI frontends available for git, depending on what you want to do, you may want to google for "git gui".

Besides, if you want to actually use git for managing development branches and doing development, my suggestion would be to use an IDE that has integrated git support (e.g. eclipse).
Even if you are "just" modifying the base package: If you are not familiar with working in a shell, using an IDE like Eclipse should get you started much more quickly.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12165
Joined: Tue Mar 25, 2008 8:40 am

Re: How to GIT

Postby Arthur Maiden » Wed Dec 01, 2010 9:25 pm

Anybody know what this error means?:
Code: Select all
******@********* ~/Desktop/Sikorsky-S92 (master)
$ git push origin master
Permission denied (publickey)
fatal: the remote end hung up unexpectedly


most of you will recognize me trying to update my git repository of the S-92
but its not working...

after a hard drive error it made me realize i need to update my git repository often...
FGUK - A FlightGear community in the United Kingdom and Republic of Ireland
Callsign: G-PHEN
AVA Callsign: AVA0016 - RETIRED
The development of the S92 has infected my Avatar...
User avatar
Arthur Maiden
 
Posts: 680
Joined: Sat Oct 03, 2009 10:42 pm
Callsign: G-PHEN
Version: GIT
OS: Vista, Ubuntu 10.04

Re: How to GIT

Postby HHS » Wed Dec 01, 2010 9:50 pm

Do you have made a SSH-key?
It looks like that there is a problem relating to it (missing, wrong....)
Up, up and away
User avatar
HHS
Retired
 
Posts: 3615
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Next

Return to Windows

Who is online

Users browsing this forum: No registered users and 0 guests