Skip to content

Remove tracked .DS_Store / editor detritus from the repo #109

Description

@d-morrison

The default branch (main) carries OS/editor detritus as tracked files:

  • .DS_Store
  • figures/.DS_Store

These serve no purpose in the repo and reappear in every clone and diff.

Fix, in this repo:

git rm --cached .DS_Store figures/.DS_Store
printf '.DS_Store\n' >> .gitignore

Fix, per-machine, so it stops recurring:

git config --global core.excludesFile ~/.gitignore
printf '.DS_Store\n' >> ~/.gitignore

R users can do the same in one call, which also covers .Rproj.user, .Rhistory, .Rdata, .httr-oauth, and .quarto -- see https://usethis.r-lib.org/reference/git_vaccinate.html:

usethis::git_vaccinate()

Found while scoping Morrison-Lab/gha#605, which proposes a reusable CI check for exactly this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions