Skip to content

Instantly share code, notes, and snippets.

Last active May 27, 2022
What would you like to do?
isomorphic-git in deno
#!/usr/bin/env -S deno run --no-check --allow-env --allow-read --allow-write --allow-net isogit.ts
import fs from "";
import path from "";
import git from "";
import http from "";
const repositoryDir = path.join(Deno.cwd(), "/../test-repository");
const repositoryUrl = "";
await git.clone({
dir: repositoryDir,
url: repositoryUrl,
ref: "main",
singleBranch: true,
noCheckout: true,
const realRepositoryDir = await Deno.realPath(repositoryDir);
console.log("repository dir:", realRepositoryDir);
const commitObjectId = await git.resolveRef({
dir: realRepositoryDir,
ref: "HEAD",
const object = await git.readCommit({
dir: realRepositoryDir,
oid: commitObjectId,
console.log("commit object:", object);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment