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