Coder Social home page Coder Social logo

git-sanity's Introduction

git-sanity

This tool allow you sanity check the history of local git repository.

A 'sane' history is one where there is no interleaved merged.

Install

git-sanity is published on hackage.

cabal install git-sanity

Note: You might have to install binary dependencies manually as cabal does not support them yet!

Usage

git-sanity check [<revision range>]
  • check: Check the whole history leading to the current commit.
  • check <revision range>: Check only commits in the specified revision range.

Git hook

In order to integrate nicely as a pre-push githooks (http://git-scm.com/docs/githooks.html), a revision range of origin/$branch~1..HEAD can be used.

Here is an example .git/hooks/pre-push file:

#!/bin/sh

branch=$(git symbolic-ref --short HEAD)

git-sanity check origin/$branch~1..HEAD

Note: The hook script pre-push must have execution permission to be successfully called by git (chmod +x .git/hooks/pre-push)

git-sanity's People

Contributors

aloiscochard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

git-sanity's Issues

update to work with base>4.8

for those on latest GHC version etc. the base is newer than what this currently allows. It might just work if the bounds are relaxed, I didn't test…

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.