Before creating a branch, doing a quick fix or messing with the models, we need to make sure our database is the same as the production one.
To do so we have a single bash (or fab) script which does:
This can all be summarized in a fab command which takes into account different OS (linux, mac), different absolute directories, and different naming of files (see fabfile.py in gist)
Ok, so we have one of those (Bfx), Urgent but simple bugfix.
If our database is out of date we can,
$ fab db_cp_prod2dev
in other words “database copy from production to development” (see gist above). And because it’s just a quick fix, we’ll stay on the master branch:
Note that I will use a few git aliases to save my typing, in particular I have a ~/.bash_aliases with:
So, work, work, work, fix, fix, fix.
$ ga -u
$ gcm "quick fix, the margin in the CSS had gone cookoo, fixed .home-box class"
Then send to testing
$ fab update_testingwhich does,
and similarly send to production when ready
$ fab update_prod
Here’s a graphical overview of the whole thing:
And that’s it for bug-fixing alone. Next part, developing a small feature in a branch.