简体   繁体   English

Rebase期间升级git版本

[英]Upgrade git version during Rebase

I've done a rebase of feature branch into development branch, and I'm about to push.我已经将功能分支重新设置为开发分支,我即将推送。 I need to push with --force-with-lease option, but git throws an error.我需要使用--force-with-lease选项进行推送,但是 git 会引发错误。 I noticed that I have git version 1.8.3 installed, while this option was introduced in 1.8.5.我注意到我安装了 git 版本 1.8.3,而此选项是在 1.8.5 中引入的。 Is there any risk of losing progress in my rebase process if I upgrade git version now to 2.16.6?如果我现在将 git 版本升级到 2.16.6,我的 rebase 过程是否有丢失进度的风险?

I'm working on Centos 7.我正在研究 Centos 7。

Git does sometimes change the rebase disk structures under the hood, although usually minor jumps are not a problem. Git 有时会在底层更改 rebase 磁盘结构,尽管通常轻微的跳跃不是问题。 If you've already finished the rebase and are ready to push, then the rebase is done, any state has been erased, and upgrading isn't a problem.如果你已经完成了 rebase 并准备推送,那么 rebase 就完成了,所有的 state 都被擦除了,升级不是问题。

If you're still in the middle of the rebase, I'd recommend holding off on your upgrade.如果您仍处于 rebase 的中间,我建议您推迟升级。 1.8.3 is quite old, and it's possible that Git has changed the way it's done things internally between then and 2.16. 1.8.3 已经很老了,Git 从那时到 2.16 之间可能已经改变了内部做事的方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM