Ignore files
The following ignore files are in the format below:
# lines starting with ' # ' are treated as comments .    &NBSP # ignores all files with file names that are foo.txt. Foo.txt # ignores all generated html files, *.html The # foo.html is manually maintained, so the exception is. !foo.html # ignores all. O and .a files. *. [OA] |
Steps
Create a new file named . Gitignore in the warehouse directory (because it is the point at the beginning, no file name, no way directly in the Windows directory directly created, you have to right-click Git Bash, in accordance with the Linux way to new . Gitignore files). As shown in.
The. gitignore file is valid for both the directory in which it resides and all subdirectories of the directory in which it resides. By adding the. gitignore file to the warehouse, other developers update the file to the local repository to share the same set of ignore rules.
Example
# Ignore *.O and *.A files
*. [OA]
# Ignore *.b and *. b file, except my.b
*. [BB]
!my.b
# Ignore DBG files and dbg directories
Dbg
# only the DBG directory is ignored and the DBG file is not ignored
dbg/
# only the DBG file is ignored and the DBG directory is not ignored
Dbg
!dbg/
# only the DBG files and directories in the current directory are ignored, and the dbg of subdirectories is not in the Ignore range
/dbg
Common ignore Phpstorm project configuration files:
. idea/
git ignore files (ignore file)