This might seem like easy, but damn, it did give me a very serious headache. I wouldn’t want anyone to go through such ever again LOL.
Dokku by default pushes from your master branch to its own master branch (per App created on your server). But what happens when you are working with a git workflow like CakeDC? You might want a deployment to be triggered from another branch (e.g. stage). Doing this without auto-deployment might be a little easy, but otherwise, just change your push command to this:
git push dokku origin/stage:refs/heads/master
The above command is assuming your repository’s address is stored as
origin and your branch of choice is
An relatively easier way can be found in dokku’s docs:
Feel free to leave comments, ask questions, make suggestions or even make corrections. : )