gitignore文件用法
怪我咯
怪我咯 2017-05-02 09:34:20
0
3
561

在.gitignore文件中,以下两行作用有什么区别吗?

/data/cache/
/data/cache/*

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
某草草

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

  1. In other words, foo/ will match a directory foo and paths

  2. 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

Ty80

.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);

Hope it helps you

洪涛

Although the meaning is different, the implementation effect is the same. They all block files in a certain directory.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!