in src/shipit/repo/ShipItRepoGIT.php [465:495]
public async function genPushLfs(
string $pull_endpoint,
string $push_endpoint,
): Awaitable<void> {
invariant(
PHP\file_exists($this->getPath().'/.gitattributes'),
'.gitattributes not exists, cowardly refusing to pull lfs',
);
// ignore .lfsconfig. otherwise this would interfere
// with the downstream consumer.
invariant(
!PHP\file_exists($this->getPath().'/.lfsconfig'),
'.lfsconfig exists, needs to strip it in your config',
);
await $this->genGitCommand('lfs', 'install', '--local');
await $this->genGitCommand('config', '--local', 'lfs.url', $pull_endpoint);
await $this->genGitCommand(
'config',
'--local',
'lfs.fetchrecentcommitsdays',
'7',
);
await $this->genGitCommand('lfs', 'fetch', '--recent');
await $this->genGitCommand(
'config',
'--local',
'lfs.pushurl',
$push_endpoint,
);
await $this->genGitCommand('lfs', 'push', 'origin', $this->branch);
}