An optional prefix
!
which negates the
pattern; any matching file excluded by
a previous pattern will become
included again. If a negated pattern
matches, this will override lower
precedence patterns sources.
https://git-scm.com/docs/gitignore
*.json
!spec/*.json
More Related Contents:
- How do I configure git to ignore some files locally?
- .gitignore is ignored by Git
- ignoring any ‘bin’ directory on a git project
- How to create a .gitignore file
- Should I check in folder “node_modules” to Git when creating a Node.js app on Heroku?
- Using git, how do I ignore a file in one branch but have it committed in another branch?
- How do I add files without dots in them (all extension-less files) to the gitignore file?
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- How do I tell Git to ignore everything except a subdirectory?
- Explain which gitignore rule is ignoring my file
- git ignore vs. exclude vs. assume-unchanged
- Whitelisting and subdirectories in Git
- When would you use .git/info/exclude instead of .gitignore to exclude files?
- How do .gitignore exclusion rules actually work?
- What is .gitignore?
- How to exclude file only from root folder in Git
- How to git ignore subfolders / subdirectories?
- Apply .gitignore on an existing repository already tracking large number of files
- What’s the difference between Git ignoring directory and directory/*?
- How to manage configuration files when collaborating?
- git still shows files as modified after adding to .gitignore
- Can I make a user-specific gitignore file?
- Git: Ignoring Version-Controlled Files
- How do negated patterns work in .gitignore?
- Why is git is ignoring files that aren’t in the .gitignore file?
- What to gitignore from the .idea folder?
- Unignore subdirectories of ignored directories in Git
- gitignore by file size?
- Can I include other .gitignore file in a .gitignore file? (like #include in c-like languages)
- Commit empty folder structure (with git) [duplicate]