After switching to a new Mac (macOS Sierra) and re-cloning all of my GitHub repositories, I began to encounter a new problem. Whenever I make changes and save an R script, and run:
git status
## Untracked files:
## (use "git add <file>..." to include in what will be committed)
## .DS_Store
## .Rhistory
.DS_Store
and .Rhistory
appear.
Question: Is there a way to stop and/or ignore (e.g. via .gitignore
, see below) these files when committing R scripts to GitHub?
I understand similar questions may have been asked, I decided to still raise this question because I really want to make sure that I get the setting right at the first place, especially if others have encountered similar problems before. If you have a way and/or references of how to solve this highly specific problem--which may require a combination of bash Terminal, R, as well as the operating system