从我的分支/合并请求中删除其他人的提交

时间:2021-05-28 08:48:26

标签: git github merge rebase

我已经尝试了这个问题的解决方案 Remove other peoples' commits on my branch after rebase gone wrong ,但对我有用。

我的提交日志如下所示:

Author: Me
Date:   Thu May 27 11:26:56 2021 +0200

     #my commit

commit somehash123abc
Author:someone else
Date:   Thu May 27 07:03:13 2021 +0000

    #somebody elses commit

commit somehash123abc
Author: someone else
Date:   Wed May 26 15:47:17 2021 +0200

    #somebody elses commit

commit somehash123abc
Author: someone else
Date:   Wed May 26 13:25:09 2021 +0000

    #somebody elses commit

并且我在 gitlab 中创建的合并请求中看到 4 个提交(一个是我的,其余不是)。我不会合并到 master 而是其他一些功能分支。

我怎么能只在分支和 MR 中提交我的提交(代码审查者看到其他提交有点混乱)? 我还尝试将我的提交“樱桃挑选”到一个新分支,但它显示了合并到“其他功能分支”的合并冲突

请帮忙。 TIA。

0 个答案:

没有答案