Git Server on Gentoo

Installation

To install the Git version control system on a Gentoo server, follow the steps below:

  1. Install the package dev-util/git
    # emerge -v dev-util/git
    When the above task finished, it printed out a message:
      * These additional scripts need some dependencies:

     *   git-quiltimport  : dev-util/quilt
     *   git-instaweb     : || ( www-servers/lighttpd www-servers/apache )

  2. Now install the package dev-util/quilt. If you don't have lighttpd or apache, install that too.
    # emerge -pv dev-util/quilt
    When it finished, it printed out such message:
    * Messages for package dev-util/quilt-0.46:

     * If you intend to use the folding functionality (graphical illustration of the
     * patch stack) then you'll need to remerge this package with USE=graphviz.
     * To enable command-line completion for quilt, run:
     *
     *   eselect bashcomp enable quilt
     *
     * to install locally, or
     *
     *   eselect bashcomp enable --global quilt
     *
     * to install system-wide.

For installing Git on other systems, check the page Git Book - Installing Git.

Configuration

Just follow Git Book - Setup and Initialization:

$ git config --global user.name "Scott Chacon"
$ git config --global user.email "schacon@gmail.com"

That will set up a file in your home directory which may be used by any of your projects. By default that file is ~/.gitconfig and the contents will look like this:

[user]
name = Scott Chacon
email = schacon@gmail.com

If you want to override those values for a specific project (to use a work email address, for example), you can run the git config command without the --global option while in that project. This will add a [user] section like the one shown above to the .git/config file in your project's root directory.

And the follow the rest on Git Book.