Skip to content

jivebot/db_branch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 

Repository files navigation

DB Branch

Rake tasks to save and restore database state by git branch.

Often, a project’s schema and/or development data will vary as you work on different branches. These tasks let you save the database state for the current git branch, switch over to another branch, and restore it when you return.

Usage

~/projects/profit [master]> rake db:branch:save
~/projects/profit [master]> git checkout feature-branch
~/projects/profit [feature-branch]> ... work on other branch ...
~/projects/profit [master]> rake db:branch:restore

Caveats

  • Helps to set git to ignore RAILS_ROOT/tmp/branch-dumps

  • Tested on OS X; probably works in Unix environments but not on Windows

  • Only supports MySQL for now

About

Rake tasks to save and restore database state by git branch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published