You can create project specific gitignore files in your git repo, and you can also create a global gitignore.
It is considered best practice to put system related files into a global gitignore.
- A gitignore file sits in either the root of your git repo or in your home directory.
- It needs to be pushed to the remote repositoy
- it needs to be named `.gitignore
These are common files that you should exclude from your projects.
#Mac
.DS_Store
.Spotlight-V100
.Trashes
# Windows
Thumbs.db
desktop.ini
# vi
*~
# vscode
.vscode
# General
log/
*.log
- You must include these in your gitignore for your cpnt261 assignments.
.env
.env.test
node_modules/
```
- In your home directory create
.gitignore_gobal
- add files that you want to exclude from all your projects in that file
- If you're on Linux or mac, run the command:
git config --global core.excludesfile ~/.gitignore_global
- If your on windows, your command will look more like
git config --global core.excludesfile %USERPROFILE%\.gitignore_global