推送具体提交到远端具体分支 git push a single commit to specific one remote branch

本文介绍了如何使用Git命令将一个特定的提交推送到远程仓库的指定分支。通过运行`git push <remotename> <commithash>:<remotebranchname>`,例如`git push origin 1cc13b67c77f04b39081b2002343f235a75015fe:master`,你可以将commit 1cc13b6推送到远程的master分支。确保先用`git log`找到要推送的提交哈希。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

– git push a single commit to specific one remote branch
– 推送具体提交到远端具体分支

git push 《remote name》 《commit hash》:《remote branch name》

remote name --> 一般是origin
git log --> 查询具体提交的hash值
remote branch name --> 你想推送到的远端分支

例子:
git push origin 1cc13b67c77f04b39081b2002343f235a75015fe:master

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值