1
0

Enable README creation and proper initial commit in auto-git

This commit is contained in:
2025-06-01 05:55:34 +02:00
parent 9afbe177d7
commit 6c456e2da2

View File

@@ -226,10 +226,10 @@ async function initGitRepo(folder) {
if (!fs.existsSync(gitDir)) {
await git.init();
const message = `Initial commit (generated by auto-git)`;
//const readmePath = path.join(folder, 'README.md');
//fs.writeFileSync(readmePath, `# Projekt in ${path.basename(folder)}\n`);
//await git.add('./*');
//await git.commit(message);
const readmePath = path.join(folder, 'README.md');
fs.writeFileSync(readmePath, `# Projekt in ${path.basename(folder)}\n`); //this is shit, it just writes something to prevent bugs when dealing with an empty folder, can be solved way better
await git.add('./*');
await git.commit(message);
}
}