"git commit -a" causes "subl -w: subl: command not found"
The issue is that git commit is trying to use an editor to allow you to create a commit message. The editor for git is possibly overridden in is set in your ~/.gitconfig file. There will be a [core] section which sets the editor

e.g. for Sublime Text

[core]
  ...
  editor = subl -w   
  ...


remove the editor line to make the default editor go back to the shell's default editor