Costa Costa - 5 months ago 38
Javascript Question

Writing a git post-commit file in node.js

I'm trying to write a git post-commit file in node.js and I'm having trouble.

The file seems to have to be named

in the
directory. Since that file can't have an extension, my vim editor won't persistently give it javascript syntax highlighting, and thus none of my snippets work, and a variety of other challenges present themselves.

What can I do? Tell git to run post-commit.js or tell vim to consider this file javascript, but that doesn't persist.



You can have the post-commit file run a separate JavaScript file.


node yourJavascriptFile.js