GitHub sees all files as either
These ignored files are tracked in a .gitignore file that is at the root of the repository.
To add files to .gitignore:
touch .gitignore
Open the file and add the name of the file/folder you do not want to be tracked.
If the file you are adding is already checked in, you will first need to untrack the file by using the command:
git rm --cached FILENAME
Ensure that the filename accurately matches the file you want to be ignored.
You can add a global .gitignore file that defines rules for adding files to ignore. This configuration can be done in the following way:
git config --global core.excludesfile PATH
where PATH
is the path to the .gitignore_global file.
Free Resources