.gitignoreThe configuration file is used to configure files that do not need to be added to version management. Configuring this file can bring great convenience to our version management.
Start with a slash "/" to indicate a directory;
Use asterisk "*" to wildcard multiple characters;
Use question mark "?" to wildcard a single character;
A match list containing a single character in square brackets "[]";
Use an exclamation mark "!" to indicate that the matched files or directories will not be ignored (tracked);
Look here:
In my opinion, there is no difference between these two commands. All content in the directory
/data/cache/
is filtered.gitignore
The configuration file is used to configure files that do not need to be added to version management. Configuring this file can bring great convenience to our version management.Start with a slash "/" to indicate a directory;
Use asterisk "*" to wildcard multiple characters;
Use question mark "?" to wildcard a single character;
A match list containing a single character in square brackets "[]";
Use an exclamation mark "!" to indicate that the matched files or directories will not be ignored (tracked);
Hope it helps you
Although the meaning is different, the implementation effect is the same. They all block files in a certain directory.