# data directory
/data/
7 .gitignore
For data files with personal data, the simplest way to ensure they’re not published in a public repository is to store all data files in a /data
sub-folder in the project directory and then exclude the data sub-folder from the Git repository. This is done by specifying the data sub-folder in the .gitignore
file.
The .gitignore
file specifies the folders and files you want to exclude from the repository i.e. it lists what you want to ignore. Holding any file based data (e.g. CSV files), whether they’re original or transformed, in a /data
sub-folder, makes it simple to exclude data from the repository by adding the following to the .gitignore
file:
As an additional precaution, any projects involving confidential information should be held in a private repository and .Rdata
should also be included in the .gitignore
file (see the section on RStudio security & data protection):
# Session Data files
.RData