Skip to content

should the create_*() do more re: .gitignore? #1952

Open

Description

@jennybc

Why don't we add a .gitignore in create_project() and create_package()?

Activity

  1. added
    git
    on Feb 27, 2024
  2. jennybc commented on Jul 24, 2025

    @jennybc
    MemberAuthor

    I guess the implicit take here is that we think people should run git_vaccinate(), i.e. the implicit advice is to have a good gitignore file at the user aka global level. I'm not sure how effective or realistic this stance is 🤔

    To be clear, a typical call to create_*() will call use_rstudio() to add an .Rproj file (currently happens in RStudio and in Positron), which does add .Rproj.user to the repo-level .gitignore. So that's often the only entry.

    But arguably some of our recommendations are relevant to any R project, such as .Rhistory and .Rdata:

    usethis/R/git.R

    Lines 565 to 572 in 6036504

    git_ignore_lines <- c(
    ".Rproj.user",
    ".Rhistory",
    ".Rdata",
    ".httr-oauth",
    ".DS_Store",
    ".quarto"
    )

  3. added this to the Backlog milestone on Jul 24, 2025
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

    git

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions