本文介绍了git push --force-with-lease是否总是安全的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直遵循规则,一旦将git历史记录推送到远程存储库就不要对其进行修改.

I've always followed the rule not to modify the git history once it has been pushed to a remote repository.

但是我想知道是否将交互式基础调整为推后租用"绕过此规则?

But I am wondering if interactive rebasing into a push --force-with-lease bypasses this rule?

如果强制租赁成功或对这种策略有任何警告,对其他用户而言是否绝对安全?

Is it perfectly safe for other users if the force-with-lease succeeds or are there any caveats to this strategy?

在此先感谢您的输入.

推荐答案

不安全.

请参见此Atlassian博客帖子,其中描述了git push --force-with-leasegit push -f更安全.但是,它会部分覆盖遥控器,从而使其不安全.

See this atlassian blog post, which describes that git push --force-with-lease is safer than git push -f. However, it partically overwrites the remote making it not safe.

这篇关于git push --force-with-lease是否总是安全的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-04 20:44