와일드 카드 패턴은 껍질 (이 아니라)로 확장되었습니다. 모든 파일이 이미 추적 된 경우 git commit -m "formatting js" httpdocs/*
을 의미
이
git commit -m "formatting js" httpdocs/fileorDir1
git commit -m "formatting js" httpdocs/fileorDir2
git commit -m "formatting js" httpdocs/fileorDir3
에 의해 번역됩니다, 자식이 작품을 커밋합니다. 그렇지 않은 경우, 본 오류 메시지가 리턴됩니다. bak_admin.abc.php
을 포함하여 명시 적으로 (전혀 추적되지) 무시 된 파일을 포함 할 것이다 그
git commit -m "formatting js" httpdocs/dir1/dir2/fileirDir1
git commit -m "formatting js" httpdocs/dir1/dir2/fileirDir2
git commit -m "formatting js" httpdocs/dir1/dir2/fileirDir3
: git commit -m "formatting js" httpdocs/dir1/dir2/*
의 경우
, 즉는 다음과 같이 변환됩니다. .gitignore를 제대로 설정하더라도
, 쉘은 (하지 이눔)
error: pathspec 'httpdocs/dir1/dir2/bak_admin.abc.php' did not match any file(s) known to git.
솔루션의 결과로, git commit
명령에 bak_admin.abc.php
을 전달합니다 : 를
git commit -m "formatting js" httpdocs/
git commit -m "formatting js" httpdocs/dir1/dir2/
'
*
'를 사용하지 않는 맞습니다. 그러나'.gitignore'가 올바르게 설정 되었다면, git-commit은 그 파일 경로를 무시해야합니다. – Vidur@Vidur 아니요.이 파일은 쉘에 의해 명시 적으로 git 커밋으로 전달되기 때문에 해당 파일을 무시하지 않습니다. – VonC
죄송합니다. 그것에 대해 불평을합니다. – Vidur