Sometimes, when working with web frameworks like django/rails, one often has to run database migrations based on the latest master. But this can pose a problem when master could often have problems because multiple developers are changing code rapidly. Or can be a problem when updating to the latest master takes a lot of time, for example running migrations on django can take a while.
A way to avoid this is to work off a local version of master that that has been setup and migrated locally, and avoid continually following master.
# Assume sha ab1234 is the sha we want to track against in master for local development
git checkout master
git pull
git checkout -b master_working
git reset --hard ab1234
git checkout master_working
git checkout -b feature_branch_working
... make code changes ...
git add
git commit
# on git branch feature_branch_working
git checkout -b feature_branch
git rebase master
git push origin feature_branch
# submit pr merging feature_branch against master
git checkout feature_branch_working
... make code changes and test locally ...
git checkout feature_branch
git merge feature_branch_working
git push origin -f feature_branch