Skip to content
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

.Rproj.user files created at some point before we're ready for them in git lesson #180

Open
pschloss opened this issue Oct 20, 2022 · 2 comments
Labels

Comments

@pschloss
Copy link
Collaborator

pschloss commented Oct 20, 2022

Some learners are getting a .Rproj.user directory in their project root and/or code/. This causes a bunch of unnecessary things to show up when they git add .

A couple of thoughts...

  1. Don't use git add ., rather, be specific about what files to add - git add file1 file2 etc.
  2. Do git status see that there's a .Rproj.user directory and introduce .gitignore and add .Rproj.user to that

I think both are probably good practices to teach people. There's a potential problem they could run into in their future where they accidentally commit a large file and then try to push it. Then Bad Things Happen. By being specific about git add they can reduce the risk of this.

@cbkerr
Copy link

cbkerr commented Oct 20, 2022

I like the idea of introducing the .gitignore file. Existing projects they clone will probably have one, and it might cause confusion if certain files don't show up in the staging area.

It is an application of the wildcards covered in the bash section!

@kelly-sovacool
Copy link
Member

kelly-sovacool commented Oct 21, 2022

Need to add all the hidden files they might have to https://github.com/UMCarpentries/intro-curriculum-r/blob/gh-pages/files/un-report_post-lesson-01.zip
so the git instructor will have them too.

Agreed that we should teach .gitignore files in the main lesson, rather than as bonus content (#108).

@kelly-sovacool kelly-sovacool added the 3-git-github Lesson 3 label Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants