In the .gitignore file, what is the difference between the following two lines?
/data/cache/
/data/cache/*
某草草2017-05-02 09:36:20
Look here:
If the pattern ends with a slash, it is removed for the purpose of the
following description, but it would only find a match with a
In other words, foo/ will match a directory foo and paths
it, but will not match a regular file or a symbolic link
foo (this is consistent with the way how pathspec works in general in
Git)
In my opinion, there is no difference between these two commands. All content in the directory /data/cache/
is filtered
PHP中文网2017-05-02 09:36:20
.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
PHP中文网2017-05-02 09:36:20
Although the meaning is different, the implementation effect is the same. They all block files in a certain directory.