如何在不推送任何其他参考资料的情况下推送'refs / replace'? [英] How to push 'refs/replace' without pushing any other refs in git?

查看:88
本文介绍了如何在不推送任何其他参考资料的情况下推送'refs / replace'?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以这种方式替换了另一个提交:

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

这个替换放在.git / refs / replace文件夹中,所以我想知道 - 我怎么能把这个参考文献推送到远端?

解决方案

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

只有显式的推送和抓取才能在git中正常工作。


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

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

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:

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

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

这篇关于如何在不推送任何其他参考资料的情况下推送'refs / replace'?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆