I'm calling git log from MATLAB to find out last commit hash and get a 'terminal is not fully functional' warning.
I don't want to fiddle around various git settings or exporting the right TERM variable (tried TERM=dumb - didn't work).
Is there a way to supress all git warnings, or at least make git not require pressing enter after each of them?
OK, the answer is to use --no-pager option e.g. like this
git --no-pager log -1 --format="%H"
But to answer question in title, use 2>/dev/null, like:
git status 2>/dev/null
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With