git shallow clone branch code example Example: shallow clone specific branch git clone --depth 1 https://path/to/repo/foo.git -b bar