I want to ignore entire public_html/ directory except one file inside
I give .gitignore as below:
public_html/*
!public_html/config/config.php
However, when I run git status , I can not find config.php has been included.
I want to ignore entire public_html/ directory except one file inside
I give .gitignore as below:
public_html/*
!public_html/config/config.php
However, when I run git status , I can not find config.php has been included.
Change .gitignore to
public_html/*
And force adding config.php into index.
git add -f public_html/config/config.php
First commit / add public_html/config/config.php
and then add public_html
to the gitignore.