This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis
Ashley Williams tweeted that !!
in commit messages will be replaced with the last executed command.
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 withssh
!: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.
Reply to Stefan
This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis
Stefan Judis | Sciencx (2017-03-20T23:00:00+00:00) Powerful history command shortcuts in bash (#tilPost). Retrieved from https://www.scien.cx/2017/03/20/powerful-history-command-shortcuts-in-bash-tilpost/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.