Reputation: 1026
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.
Upvotes: 42
Views: 71996
Reputation: 13404
If the branch already exists in the repository, it should just be:
git push origin branch_name
Upvotes: 8
Reputation: 992717
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
Upvotes: 71