I want to put all errors inside a file and prevent errors and success messages from printing on the screen. I only want to store the error message.
When I do this like the code below, the errors and success messages are shown on the screen and also inside the error.out
file.
git ls-remote "$GIT_SSH_URL/$REPO.git" 2>&1 > /dev/null | tee error.out