Project

righteous

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
ALPHA: Managing the Git sins and foibles of a large development team on Git-unfriendly Windows was becoming a nightmare at work. I started writing hooks to mitigate some of the most common mistakes, and realised to get them adopted, they need to be really easy to set up. Thus, I'm starting this project to make headway into having useful git hooks anyone can use with minimal effort.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Righteous Git Hooks

Useful Git hooks for Visual Studio projects on Windows

Note: This project is in its infancy, I need to wrap the tests in some kind of framework, add more hooks and tests, and build the installer. I'll probably make this available as a gem at some point as well...

What?

These hooks are born out of frustration working with large complicated Visual Studio solutions, in large teams, where there are constant issues, such as:

  • Generated files (using .csproj dependentupon elements, e.g. CSS from SCSS or JavaScript from CoffeeScript) get added to the repository. [NOT IMPLEMENTED]
  • Linked files (using .csproj link elements) get added to the repository.
  • Content files get added to the project, but not to Git, resulting in working builds, but broken deployments. [NOT IMPLEMENTED]
  • On Windows, incorrect Git config can result in multiple folders with names differing only by case, which causes other problems [NOT IMPLEMENTED]:
    • Browsing the repository on GitHub becomes problematic.
    • Some users will not receive all the files when they check out a branch.
    • Git will in some cases track two separate files in the index, representing only one on disk.

Clearly, these are all problematic situations. Righteous Git Hooks aims to solve all of the above problems with code :)

Installation

Currently this is largely a manual process, I'll be aiming to improve this in the future. Any help with making the hooks more universal, easier to set up, or adding additional hooks, would be much appreciated.

Requirements:

  1. Msys Git (i.e. Git for Windows) v1.8+
  2. Ruby 1.9.3 (not tested for other versions of Ruby, help with this appreciated)

Instructions:

  1. Open an admin command prompt
    • Windows 8: Hit Windows Key -> type "cmd" -> right click "Command Prompt" -> Select "Run as administrator" from the footer menu.
  2. In the console:
    • C:\>gem install bundler
    • C:\>cd righteous-git-hooks
    • C:\>bundle install
  3. Manually invoke righteous-pre-commit.sh from your repository's .git/hooks/pre-commit file.
    • The plan is to automate this step with an installer ASAP.