0

I added a post-commit git hook with Sublime Text 3, with the following text in it:

#!/bin/sh

git push -u origin master

What's odd is that committing from Git Bash's command line successfully pushes the project, but when I try to do the same using a package in Sublime Text, it does not work. The package is supposed to map a keyboard shortcut (ctrl+a) to commit a file, which it does, but it does not push the file afterward; it only commits it. Why would this work in the command line, but not in Sublime Text?

MattDMo
  • 100,794
  • 21
  • 241
  • 231
Alex
  • 3
  • 4
  • Is it called at all? Insert a logging (`echo "run at $(date)" >> /var/tmp/hook.log`) into the hook, to narrow down the problem. – user3159253 Jan 09 '15 at 00:25
  • Which plugin? [SublimeGit](https://sublimegit.net/)? [Git](https://github.com/kemayo/sublime-text-git)? – Sascha Wolf Jan 09 '15 at 07:26
  • I ended up finding the problem. I had been using Git, but when installing it, I had picked an option that didn't allow commands to be run outside of Git Bash. Thank you! – Alex Jan 09 '15 at 18:56

0 Answers0