How do I push a local Git branch to master branch in the remote?

前端 未结 5 1902
面向向阳花
面向向阳花 2021-01-29 16:53

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

5条回答
  •  不要未来只要你来
    2021-01-29 17:34

    As an extend to @Eugene's answer another version which will work to push code from local repo to master/develop branch .

    Switch to branch ‘master’:

    $ git checkout master
    

    Merge from local repo to master:

    $ git merge --no-ff FEATURE/
    

    Push to master:

    $ git push
    

提交回复
热议问题