【发布时间】:2020-02-05 23:21:54
【问题描述】:
编辑:我们不是来自开发团队。 我已经克隆了 repo 以尝试下面列出的命令。
我的同事通过 Jenkins 启动了部署,并在部署停止后 5 分钟出现错误:
[WARNING] The requested profile "ntic" could not be activated because it does not exist.
[ERROR] Failed to execute goal external.atlassian.jgitflow:jgitflow-maven-plugin:1.0-m5.1:release-start (default-cli) on project nsnet-parent: Error starting release: Error starting release: a release branch [refs/remotes/origin/release/8.15.0] already exists. Finish that first! -> [Help 1]
在 jenkins 作业输出中找到指定提交的日志部分。
> git.exe config --local --remove-section credential # timeout=10
> git.exe rev-parse "refs/remotes/origin/RCI^{commit}" # timeout=10
> git.exe rev-parse "refs/remotes/origin/origin/RCI^{commit}" # timeout=10
Checking out Revision 7e91bd1bf2353bc74ddb491faf2f83917b487211 (refs/remotes/origin/RCI)
> git.exe config core.sparsecheckout # timeout=10
> git.exe checkout -f 7e91bd1bf2353bc74ddb491faf2f83917b487211
> git.exe rev-list 7e91bd1bf2353bc74ddb491faf2f83917b487211 # timeout=10
因为我看不到分支名称 RCI 或最后一次提交。
我尝试过git reflog,但我看不到提交7e91bd1bf2353bc74ddb491faf2f83917b487211 或部署中使用的分支RCI。
你有什么想法,是否仍然可以恢复RCI分支和所有代码?
我们有 Jenkins on Windows 和 Gitlab-ci for git 项目 谢谢
【问题讨论】:
-
你能试试运行
git fetch && git branch -a --contains=7e91bd1bf吗? -
windows 的 para '&&' 出错。 powershell 无法识别它
-
好的,所以分开:
git fetch然后git branch -a --contains=7e91bd1bf -
对不起,我是白痴,我已经在单独的 linux 服务器上安装了 git。我已经克隆了 repo,但它似乎仍然是命令错误:error: malformed object name 7e91bd1bf
-
@rab "malformed object":提交根本不知道:stackoverflow.com/a/5549506/6309