How to hide "press enter or type to continue..."

Is there anyone who knows about how to hide following messages?

"press enter or type to continue hide"

This is my case

  1. Run following function:
function GitAddandCommit()
  vim.cmd('Git add %') 
  vim.cmd('Git commit')
  1. After 1), a new window open up to edit commit message

  2. After edit commit message and close window, this message shows up in a new thin window.

“press enter or type to continue”

But I don’t like to see that message and press enter key.So I’d like to hide it for hassle-free.

Search results

I found this topic relating to me.

But I wondered how to set in my case.

Thank you for your attetion.

You can look into vim.opt.shortmess

Thanks, @xlient .

vim.opt.shortmess didn’t work for my issue. But I found the resolution by set cmdheight=2 which shows only prompt message but doesn’t require Press ENTER or type command to continue. (I wonder why this works well)

:h hit-enter

In some cases you might want to increase cmdheight even more and restore it once command finishes.