diff --git a/src/git/doGitReset.ts b/src/git/doGitReset.ts new file mode 100644 index 00000000..50dab529 --- /dev/null +++ b/src/git/doGitReset.ts @@ -0,0 +1,12 @@ +import spawn from "../utils/spawn.js"; +import gitLogger from "./utils/gitLogger.js"; + +export default async function ({ + resetMode, + ref, +}: { + resetMode: "hard" | "soft" | "mixed"; + ref: string; +}) { + await spawn("git", ["reset", `--${resetMode}`, ref], gitLogger); +}