Home
Personal tools
Namespaces
Variants
Actions

Using Git

From Naevwiki

Jump to: navigation, search

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.

Contents

Getting Git

Linux

Just use your package manager to get it.

Windows

A command line Git client is provided in our instructions on setting up your compiling environment. It is recommended you use this version.

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.

Checking out

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.

git clone git://github.com/bobbens/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.