Using Git

After version 0.3.6 Naev changed VCS from Mercurial to Git for size among other reasons. This intends to be a brief guide on how to use Git.

= Getting Git =

Linux
Just use your package manager to get it.

Windows
If you followed our guide for setting up your compiling environment, you have a command-line version of git. It is recommended you use this.

However, there is also a tutorial for a GUI-based client. For more information, read this Windows Git Guide.

Mac OS X
You might want to take a look at this Mac OS X Git project.

= Using Git =

A helpful guide on using Git in combination with Github is available here. You can find a lot of answers there, including instructions on how to set up your public SSH key. However, we will also list a number of helpful commands on this page, for quick reference.

Cloning
You first do a checkout to get the repository. This should only be run once. It might take a while since Naev is quite big currently.

Note: if you intend to submit your own edits to the Naev project, you should first get yourself a fork of the project on github, and clone from there. Ignore the remainder of this tutorial, and follow the instructions here.

If all you wish to do is get updates from git without submitting your own, you can simply clone from the official repo:

git clone git://github.com/naev/naev.git

Updating
It is a good idea to update Naev as often as possible. It is a developer goal to try to keep HEAD (latest version) always workable and this will help with bug reports.

git pull

Pulling branches
To get an official branch you can do the following:

Find out which branches currently exist git remote show origin

Pull a branch, creating it locally. For example, git checkout -b bigsys origin/bigsys Then you can change between them and pull to update them whenever.

Changing branches
Git work is usually done with branches. "master" is the one with all the bleeding edge changes while all releases past 0.3.8 will have their own. You can switch between them with stuff like:

Change to 0.3.9 branch git checkout NAEV-0.3.9

Change back to bleeding edge master git checkout master

This way you can try whatever version you want.