Home > Am a Geek, Linux > Using a GIT repository

Using a GIT repository

May 20th, 2009

So you want to use a revision control system and you picked git? Cool :) . Assuming you are setting a service up from scratch, check out the following…

Install the software

See the following great locations…

http://www.kernel.org/pub/software/scm/git/docs/everyday.html

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html

http://www.sourcemage.org/Git_Guide

Setup a new repository

cd /repo/folder
git-init

Getting friendly (configured on local system)

Tell git who you are:

 git config user.name "FirstName LastName"
 git config user.email "user@example.com"

If you have many git repositories under your current user, you can set this for all of them

git config --global user.name "FirstName LastName"
git config --global user.email "user@example.com"

If you want pretty colors, turn all color options on (with git 1.5.5+), use:

git config --global color.ui "auto"

To enable auto-detection for number of threads to use (good for multi-CPU or multi-core computers) for packing repositories, use:

git config --global pack.threads "0"

To disable the rename detection limit (which is set “pretty low” according to Linus, “just to not cause problems for people who have less memory in their machines than kernel developers tend to have”), use:

git config --global diff.renamelimit "0"

Setup repo contents

git add .
git commit -m "First import: yourtreeorsoftwarename"
git tag v'yournumber'

Setup web frontend

See http://git.or.cz/gitwiki/Gitweb

Comments are closed.