From 2ebdac70da93e342e449841114b092acb2fca019 Mon Sep 17 00:00:00 2001 From: Takuma YOSHIOKA Date: Sat, 29 Apr 2017 14:22:36 +0900 Subject: [PATCH] Ignore whole directory, not only inner contents `dir/*` style let git ignore files and directories in `dir/`, but not `dir/` itself. This cause `git clean -df` to remove `dir/` **with its contents**! To prevent `git clean -df` to remove data directories (`avatar/`, `file/`, etc), use `dir/` (or `dir`) style in gitignore. --- .gitignore | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 102173e832..57ea182b2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ -avatar/* -files/* -file/* -local/* -_darcs/* -logs/* -log/* -run/* +avatar/ +files/ +file/ +local/ +_darcs/ +logs/ +log/ +run/ config.php .htaccess httpd.conf -- 2.39.5