Code Monkey home page Code Monkey logo

gitshots's Introduction

Gitshots โ€” remember every commit

Setting up your own Gitshots server

Setting up your own Gitshots server is as easy as deploying to Heroku (just copy and paste these commands).

git clone https://github.com/ranman/gitshots
heroku create
heroku addons:add mongohq:sandbox
git push heroku master

If you don't want to set up your own Gitshots server, feel free to use ranman's (it's the default).

If you'd rather not post to Gitshots in general, just record to disk, set the GITSHOTS_SERVER_URL to False

Taking a gitshot on every commit

With your Gitshots server setup, you need to configure your computer to take gitshots.

First, add the following line to your .bash_profile or .bashrc. If you don't add this line with your server URL, your gitshots will be posted to ranman's gitshot server.

export GITSHOTS_SERVER_URL=<your gitshots server url>

Next, you'll need to make sure you have python2.7 and the requests library:

pip install requests

Next, you'll need to make sure you have imagesnap, on OSX you can easily install it with homebrew:

brew install imagesnap

Next, in any repository that you want gitshots, you need to add the following line to your .git/hooks/post-commit file (if you don't have one, create one):

/usr/bin/env python2.7 PATH_TO_GITSHOTS_REPO/post-commit.py

An easy way to ensure your gitshots take for every new repository you create in the future is to add the following file at /usr/share/git-core/templates/hooks/post-commit or /usr/local/share/git-core/templates/hooks/post-commit depending on your installation of git.

#!/bin/sh

# takes a gitshot on every commit
/usr/bin/env python2.7 PATH_TO_GITSHOTS_REPO/post-commit.py

Be sure to mark both of these files as executable: chmod +x post-commit

gitshots's People

Contributors

chmullig avatar morgante avatar ranman avatar

Watchers

 avatar  avatar

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.