[bash/git] fix warnings if we are not in git repository