Download wizzy and initialize the directory with git as specified in the instructions. Instructions are here - Installation
Set Grafana properties if not set already:
$ wizzy set grafana url http://localhost:3000
$ wizzy set grafana username admin
$ wizzy set grafana password password
Import all dashboards from Grafana to your local directory
$ wizzy import dashboards
Check into Git the dashboards directory
$ git add dashboards
$ git commit -m "Initial dashboards commit"
Your dashboards are stored in local Git repo. You may now choose to push it to any remote branch!