I’m writing a script that calls git show a bunch of times. Sometimes, it calls git show $COMMIT:$FILE on $FILE that doesn’t exist in $COMMIT. This prints an error to the terminal. Normally this would be the right thing, but for the moment, I’m not bothered about this. (The script works fine even when this happens). So is there a way to just suppress errors from git? I couldn’t find a flag…
I’m writing a script that calls git show a bunch of times. Sometimes, it
Share
I think there’s no
git showflag that allows that.Just redirect the error output inside your script: