See: https://git-scm.com/docs/git-clone#git-clone---depthltdepthgt The functionality can be seen here in my fork... overall a pretty simple addition: https://github.com/camden/node-git-clone-or-pull/blob/master/index.js#L71-L73 https://github.com/camden/node-git-clone-or-pull/blob/master/index.js#L123