Git Ignoring Files and Folders Ignore files locally without committing ignore rules


Example

.gitignore ignores files locally, but it is intended to be committed to the repository and shared with other contributors and users. You can set a global .gitignore, but then all your repositories would share those settings.

If you want to ignore certain files in a repository locally and not make the file part of any repository, edit .git/info/exclude inside your repository.

For example:

# these files are only ignored on this repo
# these rules are not shared with anyone
# as they are personal                                              
gtk_tests.py
gui/gtk/tests/*
localhost
pushReports.py
server/