如何从分叉存储库和所有者存储库上的拉取请求中删除评论
How to remove comments from Forked repository and Pull request on Owner's repository
我有一些评论,并将它们推送到我的 Forked 存储库,并将请求也拉到所有者的存储库(其他人)。
现在我想删除这些评论并从拉取请求中删除它们。
我的存储库:
所有者的存储库:
- 对于第一张图片 - 它看起来像向我提交消息
如果您不想看到它们,请压缩这些提交。
- 对于第二张图片 - 您无法删除拉取请求,但可以通过 doing this 关闭拉取请求,如果您不删除拉取请求,则压缩提交会更好。
请注意,压缩提交不会删除您的提交,而是对一个提交进行多次提交。
编辑
试试这个压缩命令:
git rebase -i HEAD~4
结果:
pick 01d1124 Adding license
pick 6340aaa Moving license into its own file
pick ebfd367 Jekyll has become self-aware.
pick 30e0ccb Changed the tagline in the binary, too.
# Rebase 60709da..30e0ccb onto 60709da
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
只需 运行 下面的命令将它们合并在一起:
git reset --soft HEAD~14 &&
git commit
然后像下面这样推,-f
代表force:
git push -f
结果:
并且
[来源:]
我有一些评论,并将它们推送到我的 Forked 存储库,并将请求也拉到所有者的存储库(其他人)。
现在我想删除这些评论并从拉取请求中删除它们。
我的存储库:
所有者的存储库:
- 对于第一张图片 - 它看起来像向我提交消息
如果您不想看到它们,请压缩这些提交。
- 对于第二张图片 - 您无法删除拉取请求,但可以通过 doing this 关闭拉取请求,如果您不删除拉取请求,则压缩提交会更好。
请注意,压缩提交不会删除您的提交,而是对一个提交进行多次提交。
编辑
试试这个压缩命令:
git rebase -i HEAD~4
结果:
pick 01d1124 Adding license
pick 6340aaa Moving license into its own file
pick ebfd367 Jekyll has become self-aware.
pick 30e0ccb Changed the tagline in the binary, too.
# Rebase 60709da..30e0ccb onto 60709da
#
# Commands:
# p, pick = use commit
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
只需 运行 下面的命令将它们合并在一起:
git reset --soft HEAD~14 &&
git commit
然后像下面这样推,-f
代表force:
git push -f
结果:
并且
[来源:]