It turns out this is nothing git specific but rather command line specific and there are a lot more:
!!- last command
!1- first entry in history
!-1- last entry in history
!ssh- last command starting with
!:1- first argument of last command
For the case of git this works only when using
-m though. ;) If you want to read more about this Digital Ocean published a nice article on this topic.