git - 如何使用 Git 从 Gerrit 变更集中删除 WIP 标志
问题描述
根据文档refs/for/master%wip
,我已通过推送到 将正在进行的工作 (WIP) 变更集推送到 Gerrit 。
该文档还指出,可以通过将 WIP 标志从变更集中推送到refs/for/master%ready
,但 Gerrit 始终拒绝推送并出现错误
! [remote rejected] mybranch -> refs/for/master%ready (no new changes)
强制推也无济于事。
有没有办法在不引入人为更改的情况下通过 Git 删除 WIP 标志?
解决方案
如果您没有要推送的内容,但您想将提交标记为就绪,您可以执行以下命令:
git commit --amend --no-edit
git push origin HEAD:refs/for/master%ready ==> replace "master" with your branch name.
推荐阅读
- api - 我想实现人脸识别作为身份验证的一部分
- reactjs - 反应原生连接到 laravel 护照 api 并接收访问令牌
- php - Apache 未在运行 Virtualmin 和 http 2.0 的 Ubuntu 16.04 中启动
- kubernetes - k8s.io /apimachinery 中使用的“非结构化”包是什么?
- html - 如何在离开第一列的第二列保留提交和错误消息?
- android - android googleMaps - 如何使蓝点位置标记显示用户方向?
- c# - 每次单击按钮时自定义错误“on”抛出错误
- ios - 如何在 UITableView [Swift] 中设置特定的节标题
- ruby-on-rails - 如何在本地工作的 Rails 项目中从 SQLite 数据库更改为 PostgreSQL 数据库?
- java - 在生产中使用spring boot有什么缺点?