Using Git

From OpenSimulator

Revision as of 06:16, 14 July 2009 by SeanDague (Talk | contribs)

Jump to: navigation, search

This is an introduction to using git for OpenSim core developers.

Contents

Installing Git

Linux

Git is provided as a package with all modern Linux distributions. Install the following packages depending on environment:

  • Debian, Ubuntu: git-core

Windows

On Windows you need to install 2 packages:

  • msysgit - the basic git port for windows. Install this first.
  • Tortoise Git - the git explorer. Install this second.

When installing msysgit be sure to choose Unix style line endings. This will make it so that all the line endings are managed correctly, which will prevent merge issues in the future.

Msysgit1.png Msysgit2.png Msysgit3.png Msysgit4.png Msysgit5.png

Configuring Git

Git has both a global config and a local config for each repo. As one might expect, local trumps global. The first important thing to do is set your name and email address, as that will be used in your commits.

On Linux this is done via:

git config user.email YOUR@EMAIL.ADDR 
git config user.name "Your Name"

On Windows this done with the config menu.

Config1.png Config2.png

The OpenSim Test Repository

There is a test repository on opensimulator.org in /var/git/opensim-test. This is a point in time capture of the opensim trunk (and all changes prior). It is designed for messing around with to get comfortable with git. Don't worry about breaking this repository.

The initial clone will take a few minutes, as the git repository contains the entire history of the project.

Linux

Run the following on the command line:

git clone ssh://opensimulator.org/var/git/opensim-test

This will create an opensim-test directory locally

Windows

Right click on the Desktop (or wherever) and 'Git Clone...'

When prompted for a url provide ssh://opensimulator.org/var/git/opensim-test. You username and password will be the ones used for opensimulator.org.

Subversion Like Workflow

The first thing you should do is read the git / svn cheat sheet. This provides a very solid basis for making your changes.

Personal tools
General
About This Wiki