Git Repository Initialization Tool
Shell
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tpl
.gitignore
README
config.example.sh
grit-create.sh
grit-remove.sh
grit.sh

README

# ==============================================================================
# GRIT - Git Repository Initalization Tool
# ==============================================================================
#  - GRIT is a tool for getting repositories up and running with a single 
#    command.  It creates the repository, adds an auto-deploy hook, creates a 
#    document root, creates a vhost, reloads Apache and spits out a git repo url
#  - Created by Kevin Burns http://kevburnsjr.com

# ==============================================================================
# System Requirements
# ==============================================================================
#  - Linux  ( probably requires sudo )
#  - Apache ( http://httpd.apache.org/docs/2.2/install.html )
#  - Git    ( http://git-scm.com/download )
#    - sudo yum install git
#    - sudo apt-get install git
#    - wget http://kernel.org/pub/software/scm/git/git-1.7.3.tar.bz2

# ==============================================================================
# Linux User/Group Management
# ==============================================================================
#  - Create dev group
#  - Assign proper users to dev group

groupadd dev

useradd -g dev NEW_USER
usermod -g dev EXISTING_USER

# ==============================================================================
# Linux File Permissions
# ==============================================================================
#  - NOTE: You don't have to use these directories. Edit config.sh to match.
#  - Give group ownership to git, www and vhost dirs
#  - Give group write permission to git, www and vhost dirs

chgrp dev /var/git           # GRIT_REPO_DIR
chgrp dev /var/www           # GRIT_WWW_DIR
chgrp dev /var/www/vhosts    # GRIT_VHOST_DIR

chmod 775 /var/git
chmod 775 /var/www
chmod 775 /var/www/vhosts

# ==============================================================================
# Apache Config
# ==============================================================================
#  - Append to httpd.conf

Include /var/www/vhosts/*.conf

# ==============================================================================
# Linux Bash Config
# ==============================================================================
#  - NOTE: This is just a convenience so you can run #> grit create reponame
#  - Append to ~/.bashrc
#  - Run : source ~/.bashrc

alias grit='/var/git/grit/grit.sh'

# ==============================================================================
# Linux Sudoers Config
# ==============================================================================
#  - Append to /etc/sudoers
#  - Ubuntu uses /etc/init.d/apache2
#  - Centos uses /etc/init.d/httpd

%dev ALL=(root)NOPASSWD:/etc/init.d/httpd reload