简体   繁体   中英

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.

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

If the branch already exists in the repository, it should just be:

git push origin branch_name

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM