checkout icon indicating copy to clipboard operation
checkout copied to clipboard

Add support for reference repository parameter

Open ddompe opened this issue 2 years ago • 3 comments

Git clone command added support for a local reference repository in order to minimize the network traffic and load on the git servers for big repositories. Adding support to specify such reference git repository in the checkout action.

The is very useful in big repositories hosted in GitHub Enterprise deployments that runs massive scales of CI jobs across distributed geographies.

Tested manually in my private GitHub Enterprise instances, but I lack the knowledge to create a unit test for this. Sharing to upstream so it can be taken from here, or pulled by other people needing it (see #22 and #687)

ddompe avatar Jul 03 '23 17:07 ddompe

does this work for git lfs?

Pospelove avatar Nov 21 '23 04:11 Pospelove

does this work for git lfs?

I believe it does. We use --reference with our own processes (not this action) and it's a big performance improvement and offloads work from the server and WAN links.

tbranch227 avatar Aug 25 '25 17:08 tbranch227

Bumping this PR. It would greatly benefit certain monorepo workflows.

We have implemented an Action internally to support reference clones that essentially has to reimplement the portions of actions/checkout we care about; it would be nice for this to just be a built in feature.

sizehnde avatar Nov 12 '25 20:11 sizehnde