- Create the directory. Git will not track an empty directory, but use the following trick.
- Inside that directory, create an invisible file in that directory called “.keep” by running this command in your MacOS / Linux terminal:
touch .keep
- Now when you run
git status
you’ll see that Git is now recognizing and tracking the directory!
Note that you can call this file whatever you want - the .
at the beginning makes the file invisible, and the keep
is just a standard way of naming these types of files in Linux.
Happy coding!