Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
サイトの開発に git を使用していますが、気になることが 1 つあります。共有ホスティング (cpanel) にあるサイトの場合、ホーム ディレクトリに .gitignore を作成し、そのファイルに "public_html" を除くすべてのフォルダーを配置する必要があります。public_html 以外のホーム ディレクトリ内のすべてのフォルダを動的に除外する方法はありますか?
!.gitignore ファイルのパターンを除外するために使用します
!
例えば:
*/ !public_html
これにより、public_html を除くすべてのディレクトリ (後で作成するものも含む) が除外されます。