별표가없는 동등 물로 대체 할 수없는 용도가 있습니까? .gitignore 경로 일치 구문에서 별표 "** /"가 중복 되나요?
https://git-scm.com/docs/gitignore#_pattern_format
Two consecutive asterisks ("**") in patterns matched against full
pathname may have special meaning:
A leading "**" followed by a slash means match in all directories.
For example, "**/foo" matches file or directory "foo" anywhere,
the same as pattern "foo". "**/foo/bar" matches file or directory
"bar" anywhere that is directly under directory "foo".
A trailing "/**" matches everything inside. For example, "abc/**"
matches all files inside directory "abc", relative to the location
of the .gitignore file, with infinite depth.
A slash followed by two consecutive asterisks then a slash matches
zero or more directories. For example, "a/**/b" matches "a/b",
"a/x/b", "a/x/y/b" and so on.
Other consecutive asterisks are considered invalid.
나를 내가 중복을 슬래시/주요 별표에 대해 단지 부탁 해요 있다는 지적하자.
# NuGet Packages
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
그리고 나는 그들이 단순히 쓸 수없는 이유, 궁금 해서요 : 어떤 **/foo/bar
는 예를 들어 간단한 foo/bar
로 대체 할 수 있기 때문에, 나는 내 .gitignore
파일에 다음 한
# NuGet Packages
# The packages folder can be ignored because of Package Restore
packages/*
# except build/, which is used as an MSBuild target.
!packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!packages/repositories.config
https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
'foo/bar'가'**/foo/bar'와 동일하기 때문에 여러분이 선택한 최악의 예제입니다. 그러나 별표를 사용할 때마다 대체 할 수 없습니다. ;-) – Vampire
누가'foo/bar'에 관심이 있는지 - 질문은 ** **/foo 또는/foo .. :) 내 예제는 정확하다;) –
그 외 : * */foo/bar는 foo/bar와 동일합니까? 그 질문에 대한 대답은 '예'이고 나는 틀린 것입니다. –