저는 Git을 통해 관리하는 Lemonstand 사이트를 구축하는 중입니다. 따라서, 나는 다음과 같은 .gitignore 규칙을 사용하고 있습니다 :.gitignore 규칙이 작동하지 않습니다.
# Lemonstand
.htaccess
php.ini
boot.php
index.php
install.php
/config/*
/controllers/*
/init/*
/logs/*
/phproad/*
/temp/*
/uploaded/*
/installer_files/*
/modules/backend/*
/modules/blog/*
/modules/cms/*
/modules/core/*
/modules/session/*
/modules/shop/*
/modules/system/*
/modules/users/*
# add content_*.php if you don't want erase client changes to content
/modules/gallery/*
/modules/lddevel/*
/modules/tweak/*
(상단 블록 I got from github을, 두 번째 블록과 내가 Lemonstands 업데이트 시스템에 문제를 피하기 위해 자신을 추가 몇 가지 추가 규칙 인).
내 문제는 Lemonstand에 사용자 정의 인보이스를 추가한다는 것입니다. Lemonstand에 짧게 자르면 폴더와 일부 파일을 이라고하는 /modules/shop/invoice_templates/
내에 추가해야합니다. 이 기본 Lemonstand에 추가하기 때문에
, 나는이 자식과 추적 싶어, 그래서 내 gitignore 파일의 맨 아래에 다음과 같은 규칙을 사용하려고 해요 : 때
!/modules/shop/invoice_templates/cm_standard/*
그러나 git add -A
을 실행하면 해당 디렉토리 내의 파일을 선택하지 않습니다. 나는 git add modules/shop/invoice_templates/cm_standard/*
을하더라도 그것은 나에게 말한다 : 더 내가 제대로 규칙을 작성하지했습니다 제안
The following paths are ignored by one of your .gitignore files:
modules/shop/invoice_templates
Use -f if you really want to add them.
fatal: no files added
을 - 누군가가 도와 드릴까요? 고맙습니다. /modules/shop/*
효과적으로은 !/modules/shop/invoice_templates/cm_standard
의 내용을 보이더라도 전에 디렉토리 탐색에서 /modules/shop/invoice_templates/
전체를 치기, !/modules/shop/invoice_templates/cm_standard/*
보다 우선 순위를 복용 귀하의 경우 있도록
'!/modules/shop/invoice_templates/cm_standard /'가 더 잘 작동할까요? (마지막''* ''없이) – VonC
@VonC - 시도해도 작동하지 않았습니다. cm_standard는 파일이 아닌 디렉토리입니다. 원래 질문에서 명확하게 설명했는지 확신 할 수 없기 때문에 결국 *를 얻었습니다. –
디렉토리 내용을 무시하고 싶을 때는''*' '이 필요하지 않습니다 : 모든''*''를 제거하고 더 잘 작동하는지 확인하십시오. (각 디렉토리에 대해 마지막 '/'를 유지하십시오.) – VonC