【问题标题】:Remove a reference with a commit message on GitHub?在 GitHub 上删除带有提交消息的引用?
【发布时间】:2013-04-10 13:41:49
【问题描述】:

可以通过以下方式从其他问题中引用问题:

reference #xxx

是否有可能从提交问题中删除引用? (比如这个:)

【问题讨论】:

    标签: github command commit


    【解决方案1】:

    当然,但这需要重写提交历史记录,这在公共回购中被认为是不良行为。

    但是,如果您决定这样做,只需编辑提交并强制推送

    git commit --amend
    git push --force origin master
    

    【讨论】:

    • -1。更改提交消息会导致新的提交,因此引用将保留。
    猜你喜欢
    • 2015-03-09
    • 1970-01-01
    • 2013-08-09
    • 2012-01-11
    • 2015-07-18
    • 2020-06-26
    • 2020-12-16
    • 1970-01-01
    相关资源
    最近更新 更多