alibaba / git-repo-go

git-repo is a command-line tool for centralized workflow, can work with Gerrit, AGit-Flow compatible servers. It is written in Golang, and it can be installed easily without further dependency. It provides an easy-to-use solution for multiple repositories which is introduced by Android repo first, and it can also work with a single repository.

Home Page:https://git-repo.info/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git pr --change xxx 不能推送已存在的PR

WaferJay opened this issue · comments

报错

$ grpr --change 10338772 
ERROR: rename <PROJECT_DIR>/.git/UPLOAD_OPTIONS.d.lock <PROJECT_DIR>/.git/UPLOAD_OPTIONS.d: file exists
Uncommitted changes in mmc-wireless/<REPO_NAME> (did you forget to amend?):
Continue uploading? (y/N) y
Enumerating objects: 40, done.
Counting objects: 100% (40/40), done.
Delta compression using up to 12 threads
Compressing objects: 100% (21/21), done.
Writing objects: 100% (29/29), 3.21 KiB | 1.07 MiB/s, done.
Total 29 (delta 15), reused 0 (delta 0), pack-reused 0
To gitlab.alibaba-inc.com:mmc-wireless/<REPO_NAME>.git
 ! [remote rejected] feature/bar_item_style -> refs/for-review/10338772 (invalid character '<' looking for beginning of value)
error: failed to push some refs to 'gitlab.alibaba-inc.com:mmc-wireless/<REPO_NAME>.git'

----------------------------------------------------------------------
[FAILED] ./              feature/bar_item_style (upload failed: exit status 1)

alias:

$ alias | grep -E 'grcr|grpr'
grcr='git repo download --single'
grpr='git repo upload --single'

在其他分支上通过 grpr 提交了一个PR,然后切新分支再 grcr 拉下来修改,最后用 change 参数更新PR是报错。是内网 gitlab 不支持这样的操作吗?

加了 dryrun 参数后,看到这条命令。应该是它运行失败了。

git push -o oldoid=8368bb10026f133bd631dda7487c272b50d0d455 origin refs/heads/feature/bar_item_style:refs/for-review/10338772