Automatically generate .gitignore
Attempts to add targets that remake will generate to your
.gitignore. If the file already exists, then the files
will be added (if not already present), otherwise a file will be
TRUE (the default) then we
attempt to check with
git to see if the files are already
ignored by any gitignore (including a system-specific
global gitignore) and only files that are not already excluded
will be added. Probably after running this function you will want
to do some editing.
auto_gitignore(remake_file = "remake.yml", check_git = TRUE, dry_run = FALSE)
Name of the remake file to use, by default
Use the output of
git check-ignoreto determine which files are already ignored? This is only done if git is detected to be installed and if the working directory appears to be in a git repository.
Don't modify the .gitignore, but instead return a character vector of what would be added.