这也太菜了 ask him to create a revert PR, and revert his merge then re-open his old PR, resolve merge conflicts, and you need to review and approve it btw, when you have devs so junior, you guys need to implement git hooks to require senior level approvals before merging
这也太菜了 ask him to create a revert PR, and revert his merge then re-open his old PR, resolve merge conflicts, and you need to review and approve it btw, when you have devs so junior, you guys need to implement git hooks to require senior level approvals before merging 纷纷大土豆 发表于 2022-06-16 17:18
两个版本公共branch history都有。
那么问题来了,公序良俗的角度, 咱就是说。。。。。应该是楼主还是应该同事B来在git上面解决这个问题呢?
是啊,居然可以直接push to public…
如何行数比较多,你可以直接revert 他的 commit, 然后告诉他自己fix. 你也可以让他自己revert 自己的commit 。
如果行数少,怎么办都行。
ask him to create a revert PR, and revert his merge
then re-open his old PR, resolve merge conflicts, and you need to review and approve it
btw, when you have devs so junior, you guys need to implement git hooks to require senior level approvals before merging
同意。如果对方是新手,楼主和他一起做比较好。
当然你也可以在第三步forward merge ,merge --squash 或者rebase。
然后B还要把上述的步骤再做一遍, 还不如lz 自己修算了。
revert 大部分是 work 的。 当然, 有时 revert 也会有 conflict.
这个是正解。
Lot 如果我们这里有菜鸡竟然不会resolve merge conflicts, 肯定有人会在slack channel 里@他一下。。。让他revert
revert conflict 很麻烦的,尤其是如果没有好的 tool, 只能命令行改,我我经常也会搞晕,所以只能特别小心。
or check out a previous commit and force push 😂😂
Resolve conflicts 这种烂摊子没人爱干
大概率是 merge 的时候 conflict 搞混了, review 的人也没 catch 到。
所以先 backout 是正解。
当然是同事的问题。
每次提交前,要先pull一下,看有没有更新的commit,merge有conflicts要修好,在push上去。
GitHub都用PR,你如果不怎么做开源项目,确实不会用到这个。
squash一般是多个commits合起来提交,给人code review用的。一般谁都不会用这个。
lz这情况,共同工作人数少,直接merge,fix conflicts。如果人多,就用rebase。
有没有instagram 工作的小伙伴?听说你们只有master branch. 大家都直接在master 上面实操
垃圾堆吗谁都可以merge
不是新老问题,你只在脸家干过吧? PR- Amazon CL-Google Diff-Meta
哈哈, 世界上好像只有这三家公司?