How to push 'refs/replace' without pushing any other refs in git?

后端 未结 1 1469
难免孤独
难免孤独 2020-12-09 17:16

I have done a replacement of one commit with another in this way:

* HEAD
|
...
|
* ==> *  `git replace left_commit right_commit`
|     |
*-----/
|
...
         


        
1条回答
  •  时光取名叫无心
    2020-12-09 17:46

    Found the answer in mailing-list:

    git push origin 'refs/replace/*'
    git fetch origin 'refs/replace/*:refs/replace/*'
    

    Only explicit pushing and fetching do work right now in git.

    0 讨论(0)
提交回复
热议问题