[ Y k N x ] 4

Database branches with Git Hooks

The Problem

You may skip to the solution part at the bottom if you feel brave

Branching means you diverge from the main line of development and continue to do work without messing with that main line. - git

Branches are one of the more powerful features of a VCS, you can work on new features and test changes without touching your master code. But many times those changes implies to do some changes on the database too, and well, your database certainly doesn’t live within your repository, so if you want to go back to master or to another branch you need to discard the changes you made to the database.

For this you have many options:

Read more →