Yes, it does matter which one. This comment is not specific to this thread ...
One should always connect the ground cable to the battery last and take it off first. If the ground cable is already connected and you touch sheet metal, frame, etc grounded metal (most of it is) with your wrench while working on the hot cable you will draw big sparks. If the the hot cable is connected first, touching grounded metal will do no harm if the ground cable has not been installed first.
All of my comments assume a minimum level of caution/care being taken. That said, this is good advice in general. I will amend that.