We switched to Git this year, and we now use Git almost exclusively at Art of Mission. We’ve even moved over most of our old svn repositories.

One thing we wanted to do recently was to post commit messages into our Backpack journal. Turns out it is very easy with Git and a little bit of Ruby code.

This would go in .git/hooks/post-commit (make sure to make the that file executable):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env ruby
require 'rexml/document'
require 'net/http'

# Customize these values: 
  # Your backpack account:
ACCOUNT = "yourbackpacksubdomain"
  # Your backpack user id: