]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Ignore whole directory, not only inner contents
authorTakuma YOSHIOKA <tashioka.256@gmail.com>
Sat, 29 Apr 2017 05:22:36 +0000 (14:22 +0900)
committerTakuma YOSHIOKA <tashioka.256@gmail.com>
Sat, 29 Apr 2017 05:22:36 +0000 (14:22 +0900)
`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

index 102173e832708f11078f366b3ec8fb8ceca3f51b..57ea182b2c25aa30fd24f37d0360e09153978878 100644 (file)
@@ -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