I'm using git to manage some custom packages. If the package is not in the first repo, I want to run a second command that tries another source. I don't need to tell the user that this is happening. The user doesn't need to know git exists.
if ! git clone email@example.com:username/repo directory -q
#do something else
git clone firstname.lastname@example.org:username/repo directory > /dev/null 2>&1 - older bash
git clone email@example.com:username/repo directory &> /dev/null - newer bash (Above version 4 according to the link below)
For more details read about I/O Redirection in Bash.
Essentially what you're doing here is redirect both
/dev/null, which is "nowhere".