Skip to content

Flyn/git-dude

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 

Repository files navigation

git-dude with trac links

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

TracLinks is a fork creating links to directly access commit, tag and branch pages on a trac installation configured with a GitPlugin. Links only works on KDE because Gnome seems to completely ignore Hyperlinks tags.

I didn't test it on Mac OS.

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.

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/Flyn/git-dude/raw/traclinks/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.

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 url for the trac server:

$ git config --global dude.tracUrl "http://mytrac:8000"

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

Author

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

Trac Links branch: Flyn (@flynscape)

About

Git commit notifier with links to a Trac/Git Install

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%