www ディレクトリ内の .htaccess ファイルを除くすべてのファイルを無視しようとしています。
私はこれを持っています:
# Ignore everything in this directory
*
# Except this file
!.gitignore
!/www/.htaccess
そして、私もこれを試しました:
# Ignore everything in this directory
*
# Except this file
!.gitignore
!www/.htaccess
実行するgit status
と、.htaccess が追加されたファイルとして表示されません。.gitignore ファイルをコミットしようとしました。まだ何もありません。明らかな何かが欠けていますよね?
アップデート
私もこれらを試しました:
# Ignore everything in this directory
*
*/\.htaccess
# Except these files
!.gitignore
!www/\.htaccess
と
# Ignore everything in this directory
*
*/.htaccess
# Except these files
!.gitignore
!www/.htaccess