处理 Git 致命:无效的修订范围

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19227219/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 09:09:57  来源:igfitidea点击:

Dealing with Git fatal: Invalid revision range

gitatlassian-crucible

提问by Al-Punk

I am having an issue with Crucible and Git commit. Crucible hangs on

我遇到了 Crucible 和 Git 提交的问题。坩埚挂了

>git whatchanged --always --reverse --date-order -m --no-abbrev --no-renames 9e00d1317c4363f73b7deb5caf5096c69e646b81..641c20936dbec78308d1bfa06d14f174f9d7df1d --pretty=format:C:%H%nP:%P%nA:%aN%nE:%aE%nR:%cN%nF:%cE%nD:%at%nS:%s%nB:%b%n@@fe_body_end@@

with the error:

有错误:

fatal: Invalid revision range 9e00d1317c4363f73b7deb5caf5096c69e646b81..641c20936dbec78308d1bfa06d14f174f9d7df1d

Apparently there is an error in the

显然有一个错误

>git show 641c20936dbec78308d1bfa06d14f174f9d7df1d
fatal: bad object 641c20936dbec78308d1bfa06d14f174f9d7df1d

What is the best way to correct such problems? Git fsck leads to no errors...

纠正此类问题的最佳方法是什么?Git fsck 不会导致任何错误...

git fsck --full Checking object directories: 100% (256/256), done. Checking objects: 100% (21169/21169), done. dangling commit 50062154743dbc78837af62cc49388f9fabe5b58 dangling blob 4b82dcbd1bb49f865e5069f31d50cd9304e31c3e

git fsck --full 检查对象目录:100% (256/256),完成。检查对象:100% (21169/21169),完成。悬空提交 50062154743dbc78837af62cc49388f9fabe5b58 悬空 blob 4b82dcbd1bb49f865e5069f31d50cd9304e31c3e

回答by zonabi

this usually happens when someone forces a push across branches, or otherwise messes with the revision history. (like modifying history commits etc)

这通常发生在有人强行推动跨分支或以其他方式弄乱修订历史时。(比如修改历史提交等)

you may need to recreate the branch.

您可能需要重新创建分支。

回答by dude

Turn off the changelog until a successful build, turn it back on afterwords, should be resolved.

关闭更改日志,直到构建成功,将其重新打开后,应该可以解决。

回答by Netsab612

I had the same error. I guess you have not locally pull the commit "641c20936dbec78308d1bfa06d14f174f9d7df1d".

我有同样的错误。我猜你没有在本地拉提交“641c20936dbec78308d1bfa06d14f174f9d7df1d”。

git checkout <branch_with_commit_641c20936dbec78308d1bfa06d14f174f9d7df1d>
git pull
git show 641c20936dbec78308d1bfa06d14f174f9d7df1d