Skip to content
A bash script that mimics version control for your database. (sort of !!)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Gla (jii-laa)

A bash script that mimics version control for your database. (sort of !!)

Getting Started

[NOTE: This script only supports postgresl. Feel free to send PR for other adapters]


This bash script will only work on unix based os.


Clone/Download the repo and copy post-checkout file to your project's .git/hooks folder.

git clone
cd gla && cp post-checkout <project root .git/hooks folder>
sudo chmod +x .git/hooks/post-checkout

You need to create a gla.yml file in your project's root directory. Without this file, the script will fail.

For eg, we support the following keys in the yml file

adapter: psql
encoding: utf8
database: <db name>
host: <db host>
port: <db port>
username: <your database username>
password: <your database password>

Finally, you need to locate your .pgpass file which will prolly be in your home directory. If it does not exist create one.

.pgpass will allow you to run psql command without the need to re-enter the password.

Lear more about (pgpass file here)[]

In your .pgpass file, add your database like this

localhost:5432:<your db name>:<your db username>:<your db password>


  • Sushant Bajracharya
You can’t perform that action at this time.