diff --git a/.changeset/nervous-mirrors-cough.md b/.changeset/nervous-mirrors-cough.md new file mode 100644 index 0000000000..da96e49edc --- /dev/null +++ b/.changeset/nervous-mirrors-cough.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-scaffolder-backend': patch +--- + +bug(scaffolder): Ignore the .git folder when adding dot-files to the index diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts b/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts index 796e48b8f8..ffefb88cf0 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/publish/helpers.ts @@ -39,7 +39,7 @@ export async function initRepoAndPush({ dir, }); - const paths = await globby(['./**', './**/.*'], { + const paths = await globby(['./**', './**/.*', '!.git'], { cwd: dir, gitignore: true, dot: true,