Restore PWD after checking the alternative repos for git branches.