On my webserver I currently have a Virtual Host, with an almost exact copy of my main public website, set up for testing purposes so I can edit my website and test new features without editing my live website. It has a simple .htaccess and .htpasswd authentication using
AuthType Basic
AuthName "Restricted access"
AuthUserFile /home/USERNAME/.htpasswd
require valid-user
I am wondering if it is possible to have a branch from my main website GitHub repo that, when I merge the changes from the test branch to the master branch, it will not merge the .htaccess and .htpasswd files.
I'm also wondering if it is possible to have the test branch link to a different folder on my webserver. For example the master branch will be linked to /var/www/html
and I would like the test branch to be linked to /var/www/test
.
Please make answers idiot proof as I still only have a very basic understanding of Git and GitHub