Search code examples
gitgit-push

git push to existing remote branch


How do I push changes from a local git branch to an existing non-master remote branch? If I do a "git push", it tries to push changes in all local branches to the remotes they are tracking.


Solution

  • To do this you use a refspec, as explained in the git push documentation. For example:

    git push origin local_branch_name:remote_branch_name