Forums

pushing from local repository

Hi All, I am following this guide https://blog.pythonanywhere.com/87/ to try and setup my workflow.

Locally I have a production branch and dev branch that I work from. When I make changes I start a new branch and merge that into the dev branch. When I am happy with the changes I merge dev into production. My problem with pushing to my remote that was setup following the above guide, is I am not pushing the dev branch I am pushing the master. I would like to push my dev branch to the master branch of the remote. How do I do this or is there a better option to fix this workflow?

I think for the post receive hook, instead of

GIT_WORK_TREE=/var/www/sites/mysite git checkout -f

you can try

GIT_WORK_TREE=/var/www/sites/mysite git checkout -f dev-branch

and then later on,

git push pythonanywhere dev-branch

After reading your reply it makes perfect sense. Worked like a charm, thanks Conrad!