See Github repo readme section for full details

Shallow clone

Use the following git cmd: git clone --branch XX --single-branch --depth 1 RepoURL TargetRelativeDir. For example git clone --branch 5.5 --single-branch --depth 1 https://github.com/EpicGames/UnrealEngine.git 5.5.