-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgit.js
More file actions
20 lines (17 loc) · 696 Bytes
/
git.js
File metadata and controls
20 lines (17 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// RUN THIS ON A NEW STACKBLITZ INSTANCE AND USE THE COMMAND LINE TO PUSH
import { simpleGit } from "simple-git";
// This apparently breaks without this wrapper, even for type=module in package.json
(async () => {
try {
const git = simpleGit();
await git.addConfig("user.email", "97845741+circle-gon@users.noreply.github.com", false, "global");
await git.addConfig("user.name", "circle-gon", false, "global");
// eslint-disable-next-line no-console
console.log("Done setting config!");
} catch (e) {
// eslint-disable-next-line no-console
console.log("Uh oh, something went wrong...");
// eslint-disable-next-line no-console
console.error(e);
}
})();