如何将本地Git分支推送到远程的master分支?

问题描述:

我在本地存储库中有一个分支,称为develop,并且我想确保在将其推送到源时将其与origin/master合并.目前,当我推送时,它已添加到远程开发分支.

I have a branch called develop in my local repo, and I want to make sure that when I push it to origin it's merged with the origin/master. Currently, when I push it's added to a remote develop branch.

我该怎么做?

$ git push origin develop:master

或更笼统地

$ git push <remote> <local branch name>:<remote branch to push into>