git - 如何推送开发分支而不是掌握?
问题描述
每当我尝试使用以下命令推送时,将创建的拉取请求将始终针对主分支
git push origin my_sample_branch
我已经尝试将我的上游设置为
git push --set-upstream origin develop
但我仍然推到主分支。怎么来的?
解决方案
试试这个命令语法:
git push <remote> <local_branch>:<remote_branch_name>
在您的示例中,例如:
git push origin my_sample_branch:develop
推荐阅读
- caching - Cloudflare 按前缀清除缓存不起作用
- css - 脉轮卡组件是垂直映射而不是水平映射
- spring - 用于在反序列化期间忽略未知属性的 SpringMVC 全局设置
- javascript - Angular 不更新 *ngFor 循环
- python - 如何绘制具有多个数据集的多个分类器的准确性
- python - 由于日期时间比较,根据时间框架中断过滤 icalendar 事件
- python - 用于从新的 www.ffiec.gov 站点抓取银行控股公司 (FR Y-9C) 数据的 Curl 命令(或无头 python 替代方案)?
- python - 如何允许使用 kivy 放大图像
- javascript - 当链接与 content_script 不匹配时,如何禁用扩展?
- flutter - 如何在每行 textbutton.icons 之间添加间距