Dokku: How to push from another branch other than master

Henry Falade
May 12 · 1 min read

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.

Photo by Safar Safarov on Unsplash

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 stage.

An relatively easier way can be found in dokku’s docs:


Feel free to leave comments, ask questions, make suggestions or even make corrections. : )