Getting started
Committing
Browsing the history
Undoing
Staging
Git diff
Merging
Ignoring files and folders
Ignoring files and directories with a .gitignore file
Examples
Other forms of .gitignore
Cleaning up ignored files
Checking if a file is ignored
Exceptions in a .gitignore file
A global .gitignore file
Ignore files already committed to a git repository
Ignore files locally without committing ignore rules
Ignore a file in any directory
Ignoring subsequent changes to a file without removing it
Ignoring files in subfolders, multiple .gitignore files
Prefilled .gitignore Templates
Create an empty folder
Find files ignored by .gitignore
Ignore only part of a file stub
Ignore changes in tracked files. stub
Clear already committed files but included in .gitignore
Working with remotes
Submodules
Aliases
Rebasing
Configuration
Branching
rev-list
Squashing
Cherry picking
Recovering
git clean
.gitattributes
.mailmap
Different workflows
Pulling
Hooks
Cloning repositories
Stashing
Subtrees
Renaming
Pushing
Internals
git-tfs
Empty directories in git
git-svn
Archive
Rewriting history with filter-branc
Migrating to git
Show
Resolving merge conflicts
Bundles
Display commit history graphically with gitk
Bisecting to find faulty commits
Blaming
Git revisions syntax
Worktrees
Git remote
Git large file storage
git patch
git statistics
git send-email
git gui clients
reflog - restoring commits not shown in git log
TortoiseGit
External merge and diff tools
Update object name in reference
Git branch name on Bash Ubuntu
Git client-side hooks
Git rerer
Change git repository name
git tagging
tidying up your local and remote repository
diff tree
Contributors

Ignore files locally without committing ignore rules

suggest change

.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/

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents