Month: March 2017

  • Ignore contents of folder with .gitignore

    In some cases you might want to keep a folder, but ignore the contents. For example, say we have the following folder structure: WWW/ app/ tmp/ tmp-file-1.html tmp-file-2.html to keep the “tmp” folder in the repo and keep it empty add the following .gitignore file inside the tmp folder: # Ignore all files in this […]

  • Clear .git cache

    git rm -r –cached . git add . git commit -am ‘git cache cleared’ git push origin master  

  • Redirect entire domain to HTTPS

    Add the following to your .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://mydomain.co.uk/$1 [R,L] </IfModule>