Giter Club home page Giter Club logo

git-dude's Introduction

git-dude

git-dude is a simple git desktop notifier. It monitors git repositories in current directory for new commits/branches/tags and shows desktop notification if anything new arrived.

How it works

It simply uses git fetch and parses its output to see what has changed. Then it formats new commit messages with git log and shows desktop notification with notify-send / kdialog (Linux) or growlnotify (OSX). All of this in infinite loop.

How does it look

Fedora:

git-dude on Fedora

Ubuntu:

git-dude on Ubuntu

OSX:

git-dude on Mac OSX

Haiku:

git-dude on Haiku

Requirements

On Linux:

  • notify-send on Gnome (Fedora: libnotify package, Ubuntu: libnotify-bin package)
  • kdialog on KDE (included in KDE)

On OSX:

  • growlnotify, from Growl Extras (Homebrew: growlnotify package)

Installation

$ curl -skL https://github.com/sickill/git-dude/raw/master/git-dude >~/bin/git-dude
$ chmod +x ~/bin/git-dude

* Make sure ~/bin is in your $PATH or put git-dude script somewhere else on your $PATH.

Homebrew

Git-dude can be installed with the following command:

brew install https://raw.github.com/gist/1289314/git-dude.rb --HEAD

The homebrew formula lives here.

Usage

git-dude iterates over repositories that live inside the dude directory. This directory is nothing more than container for cloned repositories of projects you want to watch. Name it like you want, here for example we use ~/.git-dude:

$ mkdir ~/.git-dude
$ cd ~/.git-dude

Clone some repositories:

$ git clone --mirror https://github.com/joelthelion/autojump.git
$ git clone --mirror git://github.com/pyromaniac/hoof.git

I recommend git clone --mirror - it doesn't checkout working directory so it saves some disk space for bigger projects.

Symlinked repositories work too. This way you can monitor already cloned projects:

$ ln -s ~/code/tmuxinator .

Now run this to monitor pwd:

$ git dude

You can also pass directory name as first argument to specify which directory to monitor instead of pwd.

$ git dude ~/watched-repos

This way you can have multiple dude directories each being monitored by separate git-dude process.

Configuration

Global

Set how often git-dude should check for changes (in seconds, default: 60):

$ git config --global dude.interval 30

Set path to icon used by desktop notifications (default: none):

$ git config --global dude.icon ~/.git-dude/github_32.png

Set custom notification command ($TITLE, $DESCRIPTION and $ICON_PATH environment variables are set when invoking notification command):

$ git config --global dude.notify-command 'gntp-send "$TITLE" "$DESCRIPTION" "$ICON_PATH"'
$ git config --global dude.notify-command 'echo -e "$TITLE\n\n\n$DESCRIPTION" | espeak --stdin -k20 -ven+12'

Per-repository

Set path to icon used by desktop notifications for this repository (default: taken from global setting):

$ git config dude.icon ~/.git-dude/dm-core/datamapper.png

Tell git-dude to ignore specific repository (if you want to unmonitor it):

$ git config dude.ignore true

Author

Marcin Kulik (http://ku1ik.com/ | @sickill)

git-dude's People

Contributors

ku1ik avatar lukaszkorecki avatar kallisti5 avatar logaritmisk avatar callumj avatar erjiang avatar joshdick avatar maw avatar stelinx avatar

Watchers

 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.