Setup Git deployment on push to remote origin with post-update hook

Git

1. Generate SSH keys pair. Use ssh-keygen command to generate SSH keys pair. Example usage: $ ssh-keygen -t rsa -b 4096 -C “taras@shkodenko.com” Generating public/private rsa key pair. Enter file in which to save the key (/home/tarasius/.ssh/id_rsa): 2. Setup SSH key authorization. To setup autorization by SSH key add contents of your public key ($HOME/.ssh/id_rsa.pub) … Continue reading Setup Git deployment on push to remote origin with post-update hook

mysql and mysqldump –defaults-file without a password

MySQL has an amazing option called –defaults-file. It can be used to store credentials in configuration file as it shown in example below: [client] user=dbUser password=dbPassword Make sure you did not store such configration files anywhere inside public_html accessible via HTTP or HTTPS on your website. It is real security breach. Do not do it. … Continue reading mysql and mysqldump –defaults-file without a password

Yii2 Framework console built-in web server can’t start

If you can`t start built-in web server in Yii2 Framework on Windows with error message like Document root “…\console/web” does not exist. in advanced application template you should use the following commands: 1. For backend admin application: yii.bat serve/index –docroot=”backend/web/” 2. For frontend application: yii.bat serve/index –docroot=”frontend/web/” For basic application template use command: yii.bat serve/index … Continue reading Yii2 Framework console built-in web server can’t start

Git: list files between two commits

Git

To display changes between two commits you need to know SHA sum of commit. You can take it from command output. Example command output: Then you can run command: it will show you list of changed files. Alternatively, you can also use command: to see the difference between seventh and fourteenth latest commits.