This bookmarklet is probably overkill and doesn't work with subtasks. Instead, just copy and paste the Asana task's link into your commit message and the relevant task will show up in Asana.
To quickly copy and paste your browser's current link: command-L then command-C. Works on any page ;-)