Git

From Deep Thought

Jump to: navigation, search

Contents


About

From the website -

Git is a popular version control system designed to handle very large projects with speed and efficiency; it is used mainly for various open source projects, most notably the Linux kernel.

Git falls in the category of distributed source code management tools, similar to e.g. GNU Arch or Monotone (or BitKeeper in the proprietary world). Every Git working directory is a full-fledged repository with full revision tracking capabilities, not dependent on network access or a central server.

Git is an Open Source project covered by the GNU General Public License v2. It was originally written by Linus Torvalds and is currently maintained by Junio C Hamano.

Installing Git

Don't have Git on your system? Try this...

Centos 4.6 Yum Install

Login as root or some other privileged account and try this:

  • create the /etc/yum.repos.d/atrpms.repo file, put this in there:
[atrpms]
name=ATrpms for Enterprise Linux $releasever - $basearch
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
enabled=0
gpgcheck=1
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
  • create the /etc/yum.repos.d/dag.repo file, put this in there:
[dag]
name=Dag
enabled=0
baseurl=http://dag.freshrpms.net/redhat/el4/en/$basearch/dag
http://ftp.heanet.ie/pub/freshrpms/pub/dag/redhat/el4/en/i386/dag/
gpgcheck=1
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
  • Make yum go get Git and install it:
# yum --enablerepo=dag --enablerepo=atrpms install git

Build From Source

This example will build the 1.5.5 release of Git (current as of this writing).

  • Grab the source files from the web to your box.
  • Untar the stuff.
  • Configure it.
  • Make it.
  • Test it.
  • Install it.
# wget 'http://www.kernel.org/pub/software/scm/git/git-1.5.5.rc3.tar.gz'
# tar xvfz git*gz
# cd git*
# ./configure
# make
# make test
# make install

Running A Centralized Repo

  • Add git to /etc/services on your box so others know we're using a port and some apps can do name to port mapping for easier system admin.
# vi /etc/services (go into insert mode & add this line to the bottom of the file)
git             9418/tcp                        # git
  • Get the system xinetd processor to load and run the git daemon to service git requests on a git:// request.
    • Create a file in /etc/xinetd.d named git-daemon and put this stuff in there:
# default: off
# description: The git server offers access to git repositories
service git
{
       disable = no
       type            = UNLISTED
       port            = 9418
       socket_type     = stream
       wait            = no
       user            = nobody
       server          = /usr/local/bin/git-daemon
       server_args     = --inetd --export-all --base-path=/home/gitrepos
       log_on_failure  += USERID
}

Related Links

  • Git - Official Site? first up on Google anyway
Personal tools
Cyber Sprocket Labs
Cyber Sprocket Tech