--depth option for checkout and update commands. Default value is infinity. More information can be found here.