I run two Heroku servers, one dev and one production. I set up Git with targets so I can do
git push dev ...
and
git push production ...
I push unfinished features that I'm testing all the time to the dev with
git push dev newBranch:master
I know that one of these days, when I'm tired, or overworked or just absent-minded, I'm going to mistakenly type
git push production newBranch:master
and push an untested, unworking feature to our live server and not realize it. Is there some way to build in a warning, so that, when I run
git push production
I get
Warning, you are about to push to the live server, do you want to continue (y/n)
or some other indication shows up on the screen? I would sleep easier at night knowing a guard like that exists.