Tuesday 15 January 2013

osx - How can I play a sound whenever I commit to Git? -


Write a code alone at home may be a different experience in daytime with your mind (dictatorship, OBV) quietly Are making magic Only silently to make the fruits of their labor silently in the zero of their source control stores, no one would be appreciated if every time you complete something then you have kept the crowd of children for the sole purpose of cheering

Wonderful, Brandon Keepers, in the Collective Idea Also, what my version of their script looks like here:

  #! / Bin / sh toplevel_path = 'git rev-parse -show-toplevel` afplay -v 0.1 $ toplevel_path / git / hooks / happykids.wav & gt; / Dev / null 2 ​​& gt; And 1 & amp;   

I've put it in a file called .git / hooks / post-commit.whileound . I then trigger it with the main .git / hooks / post-commit script:

  #! / Bin / sh toplevel_path = 'git rev-parse - sub-toplevel $$ toplevel_path / .git / hooks / post-commit.tweet $ toplevel_path / .git / hooks / post-commit.whileound   

Where there is a