happy-git-with-r
happy-git-with-r copied to clipboard
Importance of `.gitignore`
For new members in my team I drill in the importance of ensuring that you do not commit data (or sensitve stuff like API keys) to the repo.
I think .gitignore
and it's use should be highlighted in this regard.
Agree, would be a nice addition
Kind of a duplicate of #116, but this has more words 😀
There's probably scope for a chapter on the config most people need sooner rather than later.
Having a good user-level .gitignore
and sound overall gitignoring habits is a good addition. Mention usethis::git_vaccinate()
and how RStudio and usethis are also good about giving you a basic .gitignore
if you initiate packages with them.
I sort of have a start on such a chapter here (this covers configuring the editor):
https://happygitwithr.com/hello-git.html#more-about-git-config
Also: line ending stuff for Windows people.
I can also suggest:
A good default .gitignore
here.
Thouhg I'd add:
# All RData files
*.RData
Also, assuming windows, and office files intermingled I may add:
# Office
*.doc
*.doc?
*.xls
*.xls?
*.ppt
*.ppt?
# Zip
*.zip
Also a data sublfolder:
# Data folder
data\
# And/or CSV
*.csv