Using Git
From OpenSimulator
Line 17: | Line 17: | ||
[[Image:msysgit1.png]] [[Image:msysgit2.png]] [[Image:msysgit3.png]] [[Image:msysgit4.png]] [[Image:msysgit5.png]] | [[Image:msysgit1.png]] [[Image:msysgit2.png]] [[Image:msysgit3.png]] [[Image:msysgit4.png]] [[Image: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" | ||
+ | |||
= The OpenSim Test Repository = | = The OpenSim Test Repository = |
Revision as of 05:03, 14 July 2009
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.
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"
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.