I use this command super often, basically whenever I want to push a new feature for KanbanMail to production. It pushes my dev branch, goes to master, merges my dev branch, pushes it, then goes back to my dev branch. Here my two main branches are called
dev, but you could change it to whatever you want.
git checkout dev && git push && git checkout master && git merge dev && git push && git checkout dev