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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
First commit / add
public_html/config/config.phpand then addpublic_htmlto the gitignore.