You’re using version control for all of your code, right? One part of the process that took me longer than I would have liked to master is deployments via git. I use Bitbucket for all of my private repositories (I have a free unlimited account, so I haven’t found a need to pay for Github) and I wanted to find a way to deploy via the command line in the same way I push code to Bitbucket. After a lot of searching and trials and errors, I’ve come up with a good system that works for me. It might not be the best or most efficient, but it’s what makes the most sense to me. Most of my deployments will be WordPress themes and plugins that I develop for clients, so that’s where I focused my efforts.
I read a lot of code examples and blog posts while searching for this technique and a few things never clicked for me, so I wanted to highlight the process for anyone that might have been in the same boat as me.