Skip to content

[Bugfix] make default remove glob match dotfiles #612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

reekystive
Copy link

What’s Changed

  • Default option remove is changed from '.' to '**/{,.}*'.
  • The new glob pattern matches ordinary files and dotfiles, guaranteeing a truly clean working directory before publishing.

Why This Matters

  1. Glob '.' (or *, or **/*) ignores dotfiles – The old pattern skipped hidden files such as .gitignore, .nojekyll, or any project-specific dotfile, leaving them behind between deploys.
  2. First-time deploy contamination – When gh-pages checks out a brand-new branch from the current branch, existing dotfiles are copied over, polluting the freshly created branch.

Impact

  • Users with custom remove settings are unaffected.
  • Users who relied on the old “keep dotfiles” behavior (expected to be rare) will now see those files removed; they can keep the old behavior by explicitly setting remove.

Future Work

  • Consider creating the gh-pages branch from an empty tree during the very first deploy to avoid copying unrelated files at all—this can be explored in a separate PR.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant