Just add a pattern to .gitignore
.*
!/.gitignore
Edit: Added the .gitignore
file itself (matters if it is not yet commited).
More Related Contents:
- How can I make Git "forget" about a file that was tracked, but is now in .gitignore?
- What are the differences between .gitignore and .gitkeep?
- Make .gitignore ignore everything except a few files
- Global Git ignore
- .gitignore for Visual Studio Projects and Solutions
- Gitignore not working
- How to ignore certain files in Git?
- How do I ignore files in a directory in Git?
- .gitignore and “The following untracked working tree files would be overwritten by checkout”
- How can I stop .gitignore from appearing in the list of untracked files?
- How do I make Git forget about a file that was tracked, but is now in .gitignore?
- Using .gitignore to ignore everything but specific directories
- gitignore all files of extension in directory
- Git is ignoring files that aren’t in gitignore
- Git excludesfile for a branch
- Definitive retroactive .gitignore (how to make Git completely/retroactively forget about a file now in .gitignore)
- Why doesn’t Git ignore my specified file?
- gitignore does not ignore folder
- Git: How to remove file from index without deleting files from any repository
- Is there a way to tell git to only include certain files instead of ignoring certain files?
- Git – Creating a .gitignore file
- Remove directory from remote repository after adding them to .gitignore
- git ignore exception
- Definitive retroactive .gitignore (how to make Git completely/retroactively *forget* about a file now in .gitignore)
- How to .gitignore all files/folder in a folder, but not the folder itself? [duplicate]
- Why is .gitignore not ignoring my files?
- git ignore all files of a certain type, except those in a specific subfolder
- Git Ignores and Maven targets
- working with .git/info/exclude too late
- gitignore by file size?