I want to show a message on Cmder every time I do "git commit".

I want it to be a positive reinforcement like "Yeah! Well done! Keep going" :)

Is it possible to do it in some way?

2 Answers 2


To do what you ask without being jury-rigged, what you need is a git hook.

They are described in detail here

There are four events during the git commit process that you can hook and pump our your message (or do other things).

  • pre-commit
  • prepare-commit-msg
  • commit-msg
  • post-commit

The descriptions for these events to hook on can also be found in the above link. It isn't hard.

  • Muchas Gracias @Señor CMasMas
    – eyyo
    Commented May 19, 2020 at 15:27

Write an alias for your operating system. For example, a .bat file in Windows. Which would write something on the screen with echo and run the command.


git commit
echo "Good job, keep up the great work!"  

You could use Fortune in fact.
Fortune is a great little app which has like motivational messages, riddles and whatnot.
So I would just call the commit command and then fortune.

https://wiki.archlinux.org/index.php/Fortune - a wiki page from Arch Wiki
https://www.bgreco.net/fortune - A Windows example with PowerShell
https://github.com/shlomif/fortune-mod - The original repository/source code (you don't need this.)

Ps.: I would look into a site/service that can track your progress via tickets and milestones instead. Because commit is not really a sign of progress. So a site that could integrate with Github, Bitbucket, or whatever you use. And just use the issue tracker and milestone system. And if you make a good progress, it'd congratulate/motivate. If not, well, demotivate? I don't know. :D

  • Thank you very very much @Apache.
    – eyyo
    Commented May 19, 2020 at 15:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .