Last active
December 20, 2015 18:38
-
-
Save adamwiggall/6176874 to your computer and use it in GitHub Desktop.
Often you have a directory in a git repo that you want to share amongst developers, but you don't want the contents tracked. As git ignores empty directories, if you just .gitignore the directory completely it will never get added to the repo and shared. The example shows how to use this technique for the cache folder in an expressionengine inst…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From the command line | |
$ touch your/path/to/expressionengine/cache/.gitkeep | |
In your .gitignore file | |
your/path/to/expressionengine/cache/* | |
!your/path/to/expressionengine/cache/.gitkeep |
I usually drop a .gitignore into that specific folder. I'll have to give this a try.
Excellent simple solution!
This is great, thanks for sharing!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice. I think with
!.gitkeep
you don’t have to add .gitkeep for every ignored directory.