I’ve recently switched to a rather rad workflow involving a local copy of our website run through MAMP using a git repository.
We’ve recently started working on a bigger set of changes that require a feature branch. But, these changes also will require WordPress to be upgraded to 3.3, requiring database changes. Making it impossible to use the same database.
I was able to come up with this nifty technique for determining which DB to use.
That’s all there is to it. It works flawlessly.
Happy coding.
kizi2 says
very well. I like your sharing. thank you.
hopy says
Thanks for giving me the useful information. I think I need
it. Thank you
Minecraft Games says
The details are well-explained and very concise.
happy wheels says
nice! thank so much!
Ghostwritingessays says
Thanks for one more way to improve my skills as front-end developer.
Juegos Friv 3 says
This is really Good news you have shared with us. You have a very interesting blogging style. I really like the way you present. Thanks for sharing this quality information with us. I really enjoyed reading.
Kizi 1000 says
after hours of work tired, you need entertainment. Refer to our website. hope you get the most comfortable
Y8Y8Y8 says
I’m glad you enjoyed it. Those are great habits! Thank you for sharing.
agario says
Wonderful blog! This is very informative site. I am totally pleased by your excellent work. Many thanks for sharing.
Square Quick says
This article is really fantastic and thanks for sharing the valuable post.
Geometry Dash 2.0 says
I would like to thank you for your nicely written post
learntofly3 says
I’m happy about everything you bring it very interesting and helpful, thanks
Science Kombat says
Thanks for sharing this quality information with us. I like this information. Keep posting.
Jay McDonald says
I recommend not hacking around to parse the branch name, but do this instead – clean output.
// This runs a CLI Git command, which returns the name of the current Git branch
// Note that this will have an issue in any situation where Git has a detached HEAD
// Like checking out a specific commit/tag
$cmd = “/usr/bin/git symbolic-ref –short HEAD”; //must use full path/to/git for cmd to work
exec($cmd,$cmdOutput);
$currentBranch = $cmdOutput[0];
if ($currentBranch != “master”) {