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

Importance of .gitignore #143

Open
lrossouw opened this issue Jun 20, 2019 · 3 comments
Open

Importance of .gitignore #143

lrossouw opened this issue Jun 20, 2019 · 3 comments

Comments

@lrossouw
Copy link

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.

@danielkupka
Copy link

Agree, would be a nice addition

@jennybc
Copy link
Owner

jennybc commented Aug 2, 2019

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.

@lrossouw
Copy link
Author

lrossouw commented Aug 3, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants