To create a .gitignore file, go to the root of your local Git, and create it:Example touch .gitignoreNow open the file using a text editor.We are just going to add two simple rules:Ignore any files with the .log extension Ignore everything in any directory named temp...
The patternhello.*matches any file or directory whose name begins withhello.. If one wants to restrict this only to the directory and not in its subdirectories, one can prepend the pattern with a slash, i.e./hello.*; the pattern now matcheshello.txt,hello.cbut nota/hello.java. ...
Appending a slash indicates the pattern is a directory. The entire contents of any directory in the repository matching that name – including all of its files and subdirectories – will be ignored logs/ !logs/important.log logs/debug.log ...
用编辑器打开这个文件,然后填写规则,当然你可以填写自己需要的,这里我在网上找了一个比较全的配置,大家可以参考: # DIYtarget/# svn.svn/# Linux System*~# KDE directory preferences.directory# Linux trash folder which might appear on any partition or disk.Trash-*# Windows System# Windows image file c...
Patterns read from a.gitignorefile in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the toplevel of the work tree) being overridden by those in lower level files down to the directory containing the file. These patterns match ...
If you have a template that you would like to contribute, but it isn't quite mainstream, please consider adding this to thecommunitydirectory under a folder that best suits where it belongs. The rules in your specialized template should be specific to the framework or tool, and any additional...
.gitignore file in the same directory as the path, or in any parent directory, with patterns in the higher level files (up to the toplevel of the work tree) being overridden by those in lower level files down to the directory containing the file. These patterns match relative to the ...
If you have a template that you would like to contribute, but it isn't quite mainstream, please consider adding this to thecommunitydirectory under a folder that best suits where it belongs. The rules in your specialized template should be specific to the framework or tool, and any additional...
If we want to ignore all files in a directory or folder, then we can use a trailing slash after the name so assets/videos/ would ignore all files that are in that directory. We can also put comments in the gitignore file by just putting a # sign in front of any text that we want...
If you have a template that you would like to contribute, but it isn't quite mainstream, please consider adding this to the community directory under a folder that best suits where it belongs. The rules in your specialized template should be specific to the framework or tool, and any additi...