Read from STDIN on a Git pre-commit Hook (with PHP)
问题 I'm looking for a way to have git-commit wait for standard input. I'm coding this in PHP , as my bash skills are non-existant, so I thougth doing a regular <?php $input = trim(fgets(STDIN)); fscanf(STDIN, "%d\n", $line); ?> would do the trick, and wait until I write stuff in to continue, but it just goes ahead and continues executing my PHP script anyways. The idea behind this is that after I tag a release, git will push HEAD to the testing webserver, send a couple of tweets, and let me write