Skip to content
Newer
Older
100644 151 lines (97 sloc) 3.5 KB
766999d @sickill Initial commit
authored Oct 2, 2011
1 # git-dude
2
3 git-dude is a simple git desktop notifier. It monitors git repositories in
004f0e0 @sickill Words
authored Oct 4, 2011
4 current directory for new commits/branches/tags and shows desktop notification if
766999d @sickill Initial commit
authored Oct 2, 2011
5 anything new arrived.
6
fd70bc5 @sickill Words
authored Oct 2, 2011
7 ## How it works
8
361b243 @sickill Words
authored Oct 3, 2011
9 It simply uses `git fetch` and parses its output to see what has changed. Then it
fd70bc5 @sickill Words
authored Oct 2, 2011
10 formats new commit messages with `git log` and shows desktop notification with
3c85c39 @sickill Words
authored Oct 5, 2011
11 `notify-send` / `kdialog` (Linux) or `growlnotify` (OSX). All of this in infinite loop.
fd70bc5 @sickill Words
authored Oct 2, 2011
12
0ff5044 @sickill Screenshots
authored Oct 3, 2011
13 ## How does it look
14
15 Fedora:
16
c3c9eba @mhor fix screenshots
mhor authored Aug 6, 2014
17 ![git-dude on Fedora](screenshots/git-dude-fedora-shot.png)
0ff5044 @sickill Screenshots
authored Oct 3, 2011
18
19 Ubuntu:
20
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
21 ![git-dude on Ubuntu](screenshots/git-dude-ubuntu-shot.png)
0ff5044 @sickill Screenshots
authored Oct 3, 2011
22
23 OSX:
24
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
25 ![git-dude on Mac OSX](screenshots/git-dude-osx-shot.png)
0ff5044 @sickill Screenshots
authored Oct 3, 2011
26
5f3edbc @sickill Update master
authored Jul 7, 2012
27 Haiku:
28
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
29 ![git-dude on Haiku](screenshots/git-dude-haiku-shot.png)
5f3edbc @sickill Update master
authored Jul 7, 2012
30
dd9fe0f @sickill Words
authored Oct 2, 2011
31 ## Requirements
32
33 On Linux:
34
3c85c39 @sickill Words
authored Oct 5, 2011
35 * `notify-send` on Gnome (Fedora: _libnotify_ package, Ubuntu: _libnotify-bin_ package)
36 * `kdialog` on KDE (included in KDE)
dd9fe0f @sickill Words
authored Oct 2, 2011
37
38 On OSX:
39
40 * `growlnotify`, from [Growl Extras](http://growl.info/extras.php#growlnotify)
1a7dc1d @sickill Words
authored Oct 4, 2011
41 (Homebrew: _growlnotify_ package)
dd9fe0f @sickill Words
authored Oct 2, 2011
42
766999d @sickill Initial commit
authored Oct 2, 2011
43 ## Installation
44
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
45 ```bash
46 $ curl -skL https://github.com/sickill/git-dude/raw/master/git-dude >~/bin/git-dude
47 $ chmod +x ~/bin/git-dude
48 ```
766999d @sickill Initial commit
authored Oct 2, 2011
49
a18c483 @sickill Words
authored Oct 7, 2011
50 \* Make sure `~/bin` is in your `$PATH` or put `git-dude` script somewhere else
51 on your `$PATH`.
52
3efaedf @lukaszkorecki install via homebrew
lukaszkorecki authored Oct 15, 2011
53 ### Homebrew
54
55 Git-dude can be installed with the following command:
56
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
57 ```bash
58 $ brew install https://gist.github.com/lukaszkorecki/1289314/raw/022cd33fc366378552dc3527d72b994568644df1/git-dude.rb --HEAD
59 ```
3efaedf @lukaszkorecki install via homebrew
lukaszkorecki authored Oct 15, 2011
60
61 The homebrew formula lives [here](https://gist.github.com/1289314).
62
766999d @sickill Initial commit
authored Oct 2, 2011
63 ## Usage
64
004f0e0 @sickill Words
authored Oct 4, 2011
65 git-dude iterates over repositories that live inside _the dude directory_. This
66 directory is nothing more than container for cloned repositories of projects
67 you want to watch. Name it like you want, here for example we use
68 _~/.git-dude_:
766999d @sickill Initial commit
authored Oct 2, 2011
69
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
70 ```bash
71 $ mkdir ~/.git-dude
72 $ cd ~/.git-dude
73 ```
004f0e0 @sickill Words
authored Oct 4, 2011
74
75 Clone some repositories:
76
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
77 ```bash
78 $ git clone --mirror https://github.com/joelthelion/autojump.git
79 $ git clone --mirror git://github.com/pyromaniac/hoof.git
80 ```
fd70bc5 @sickill Words
authored Oct 2, 2011
81
004f0e0 @sickill Words
authored Oct 4, 2011
82 I recommend `git clone --mirror` - it doesn't checkout working directory so it
83 saves some disk space for bigger projects.
84
fd70bc5 @sickill Words
authored Oct 2, 2011
85 Symlinked repositories work too. This way you can monitor already cloned
86 projects:
87
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
88 ```bash
89 $ ln -s ~/code/tmuxinator .
90 ```
fd70bc5 @sickill Words
authored Oct 2, 2011
91
004f0e0 @sickill Words
authored Oct 4, 2011
92 Now run this to monitor _pwd_:
fd70bc5 @sickill Words
authored Oct 2, 2011
93
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
94 ```bash
95 $ git dude
96 ```
766999d @sickill Initial commit
authored Oct 2, 2011
97
fd70bc5 @sickill Words
authored Oct 2, 2011
98 You can also pass directory name as first argument to specify which directory
99 to monitor instead of _pwd_.
766999d @sickill Initial commit
authored Oct 2, 2011
100
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
101 ```bash
102 $ git dude ~/watched-repos
103 ```
766999d @sickill Initial commit
authored Oct 2, 2011
104
004f0e0 @sickill Words
authored Oct 4, 2011
105 This way you can have multiple _dude directories_ each being monitored by
fd70bc5 @sickill Words
authored Oct 2, 2011
106 separate git-dude process.
107
766999d @sickill Initial commit
authored Oct 2, 2011
108 ## Configuration
109
721f01f @sickill Support for per-repo icons
authored Oct 8, 2011
110 ### Global
111
fd70bc5 @sickill Words
authored Oct 2, 2011
112 Set how often git-dude should check for changes (in seconds, default: 60):
113
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
114 ```bash
115 $ git config --global dude.interval 30
116 ```
766999d @sickill Initial commit
authored Oct 2, 2011
117
1b813b1 @sickill Words
authored Oct 2, 2011
118 Set path to icon used by desktop notifications (default: none):
fd70bc5 @sickill Words
authored Oct 2, 2011
119
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
120 ```bash
121 $ git config --global dude.icon ~/.git-dude/github_32.png
122 ```
fd70bc5 @sickill Words
authored Oct 2, 2011
123
980e4da @sickill Support custom notification commands
authored Nov 5, 2011
124 Set custom notification command (`$TITLE`, `$DESCRIPTION` and `$ICON_PATH`
125 environment variables are set when invoking notification command):
126
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
127 ```bash
128 $ git config --global dude.notify-command 'gntp-send "$TITLE" "$DESCRIPTION" "$ICON_PATH"'
129 $ git config --global dude.notify-command 'echo -e "$TITLE\n\n\n$DESCRIPTION" | espeak --stdin -k20 -ven+12'
130 ```
980e4da @sickill Support custom notification commands
authored Nov 5, 2011
131
721f01f @sickill Support for per-repo icons
authored Oct 8, 2011
132 ### Per-repository
133
134 Set path to icon used by desktop notifications for this repository (default:
135 taken from global setting):
136
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
137 ```bash
138 $ git config dude.icon ~/.git-dude/dm-core/datamapper.png
139 ```
721f01f @sickill Support for per-repo icons
authored Oct 8, 2011
140
c6f2f69 @sickill Don't watch repos with dude.ignore = true
authored Oct 14, 2011
141 Tell git-dude to ignore specific repository (if you want to _unmonitor_ it):
142
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
143 ```bash
144 $ git config dude.ignore true
145 ```
c6f2f69 @sickill Don't watch repos with dude.ignore = true
authored Oct 14, 2011
146
766999d @sickill Initial commit
authored Oct 2, 2011
147 ## Author
148
1b813b1 @sickill Words
authored Oct 2, 2011
149 Marcin Kulik (http://ku1ik.com/ | @sickill)
c3c9eba @mhor fix screenshots
mhor authored Aug 5, 2014
150
Something went wrong with that request. Please try again.