UMCarpentries / intro-curriculum-r

Custom curriculum for teaching R, the Unix Shell, & Git with an integrated workflow and reproducible research practices.

Home Page:https://umcarpentries.org/intro-curriculum-r/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

pschloss opened this issue · comments

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.

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!

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).