Skip to content
This repository has been archived by the owner on Feb 15, 2020. It is now read-only.

Software Tutorial 03: Setting Up Your Development Environment

schristian edited this page Nov 7, 2012 · 2 revisions

For developing the code, you'll want to make an account on GitHub if you haven't already. Create an account and register an email with the account (this is how GitHub maps your commits to your identity).

1. Git Configuration

Setup your Git configuration to include your name and email.

git config --global user.name "Your Name Here" git config --global user.email "Your Email Here"

The email should match the one you told GitHub. You can also modify the text editor for Git with the following.

To use vim, a powerful editor with a high learning curve

git config --global core.editor vim

To use emacs, another powerful editor with less of a learning curve, but takes longer to load

git config --global core.editor emacs

To use nano, a simple text editor with almost no learning curve

git config --global core.editor nano

For those new to console text editors, nano is the best. It's highly suggested to learn how to use emacs or vim (or learn how to use both). On Ubuntu, nano is installed by default. You'll need to install vim and emacs with apt-get.

To setup color with git, you can set the option ui.color.

git config --global ui.color auto

To modify the global config in a text editor, you can use the -e option as such.

git config --global -e

This will open up a text editor with the global config file. At anytime, you can lookup various options for git with "git help config".

2. Generating SSH Keys

After you setup your GitHub account, you'll want to setup an SSH key and give the public key portion to GitHub (this will automatically authenticate your computer instead of having to type your password). To do that, follow these instructions.

3. Forking the Code

When developing, you don't make modifications to the main repository. Push the "Fork" button in the top-right corner on the main project page or you can fork it from here.

You'll want to change your local repository to track this branch instead. Run the following commands.

git remote rename origin upstream git remote add origin [email protected]:youraccount/tortuga.git

By doing this, you can pull new changes from the upstream repository and you will push to your own repository by default.

4. Fetching new changes

git fetch upstream git merge upstream/master

Git has a convenience command to do exactly this.

git pull upstream

It's useful to know how to do both, because sometimes you don't want to run that merge command, but you want to run something else.

5. Pushing your changes

After committing a change, you can upload it using the "push" command.

git push origin master

You can then issue a pull request to get your change merged into the main repository.

Software Tutorial 04: AI Basics