Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.3k views
in Technique[技术] by (71.8m points)

github手动合并别人的pr,但是PR状态不会自动变为merged

我通过下面的命令合并PR

git checkout -b malienist-pr/mxeditor-types master
git pull https://github.com/malienist/mxgraph-type-definitions.git pr/mxeditor-types

中间手动进行了一下rebase,合并了提交信息,然后

git checkout master
git merge --no-ff malienist-pr/mxeditor-types

这个时候别人的提交已经合并到master了,但是PR的状态还是打开的,并且会有冲突,因为我进行了rebase。

这种情况应该怎么办呢?我现在直接关掉了PR,但是感觉这样不太好。

https://github.com/hungtcs/mx...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
  1. 切换到 master/main 版本
  2. git reset --mixed 版本号 恢复到合并之前的版本
  3. git push -f 强制替换线上版本
  4. 在线上合并
  5. git pull 拉下来最新版本

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...