如何在不推送任何其他参考资料的情况下推送'refs / replace'? [英] How to push 'refs/replace' without pushing any other refs in git?
问题描述
我以这种方式替换了另一个提交:
* HEAD
|
...
|
* ==> *`git替换left_commit right_commit`
| |
* ----- /
|
...
这个替换放在.git / refs / replace文件夹中,所以我想知道 - 我怎么能把这个参考文献推送到远端?
解决方案在 只有显式的推送和抓取才能在git中正常工作。 I have done a replacement of one commit with another in this way: This replacement is placed in .git/refs/replace folder, so I wonder - how can I push this refs to the remote end? Found the answer in mailing-list: Only explicit pushing and fetching do work right now in git. 这篇关于如何在不推送任何其他参考资料的情况下推送'refs / replace'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
git push origin'refs / replace / *'
git fetch origin'refs / replace / *:refs / replace / *'
* HEAD
|
...
|
* ==> * `git replace left_commit right_commit`
| |
*-----/
|
...
git push origin 'refs/replace/*'
git fetch origin 'refs/replace/*:refs/replace/*'