简体   繁体   English

sha 指针问题 ["error": "--from 不是有效的 sha 指针:\"origin/master\"",]

[英]Problem with sha pointer ["error": "--from is not a valid sha pointer: \"origin/master\"",]

I want to deploy only changed files (according to documentation: https://github.com/scolladon/sfdx-git-delta )我只想部署更改的文件(根据文档: https://github.com/scolladon/sfdx-git-delta

I add to bitbucket-pipelines.yml:我添加到 bitbucket-pipelines.yml:

- mkdir changed-sources
- git status
- git diff YMLEdit origin/master
- sfdx sgd:source:delta --to "HEAD" -f origin/master --output changed-sources/ --generate-delta

without git diff i receive an error:没有 git 差异我收到一个错误:

sfdx sgd:source:delta --to "HEAD" -f origin/master --output changed-sources/ --generate-delta
{
"error": "--from is not a valid sha pointer: \"origin/master\"",
"output": "changed-sources/",
"success": false,
"warnings": []

} }

When I add git diff i receive this:当我添加 git diff 我收到这个:

+ git diff YMLEdit origin/master
fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Any ideas?有任何想法吗?

I tried using diffrent docker image I tried using git fetch我尝试使用不同的 docker 图像我尝试使用 git 获取

Bitbucket is probably running your pipeline in a shallow, single-branch clone, so that there is no origin/master. Bitbucket 可能在一个浅的单分支克隆中运行您的管道,因此没有源/主。 Check any appropriate bitbucket documentation to find out how to direct the pipelne to use a full clone检查任何适当的 bitbucket 文档以了解如何指导管道使用完整克隆

Solution, that worked for me: according to torek suggestion and documntation: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/ I add to bitbucket-pipelines.yml:解决方案,对我有用:根据 torek 的建议和文档: https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/我添加到 bitbucket-pipelines.yml:

clone:克隆:

depth: full深度:满

enter image description here在此处输入图像描述

暂无
暂无

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

相关问题 带有 repo init 命令的错误“致命:refs/remotes/origin/stable^0: not a valid SHA1” - error "fatal: refs/remotes/origin/stable^0: not a valid SHA1" with repo init command 如何解决 Git 报告无效的 sha1 指针 00000000000000000000000000000000000000000? - How to resolve Git reporting invalid sha1 pointer 0000000000000000000000000000000000000000? 为什么,在某些情况下,“git checkout origin / branch”会导致“分离” <SHA> “而不是”在原点/主人处脱离“? - Why, in some situation does “git checkout origin/branch” result in “detached at <SHA>” instead of “detached at origin/master”? Git:内部错误:refs / remotes / origin / master不是有效的打包引用 - Git: Internal error: refs/remotes/origin/master is not a valid packed reference &#39;git cat-file -p<sha1> &#39;: “fatal: Not a valid object name” 来自 .git/objects 的随机对象 - 'git cat-file -p <sha1>': “fatal: Not a valid object name” on random objects from .git/objects 如何从主项目Sha获得子模块Sha - How do get submodule sha from main project sha 从短SHA中找到用于git diff的长SHA - Find long SHA from short SHA for git diff GIT问题:“ master”超出了“ remotes / origin / master” - GIT Problem: 'master' is beyond 'remotes/origin/master' 如何获得分支原点尖端的SHA1? (无需切换到它) - How to get the SHA1 for the tip of a branch origin? (without having to switch to it) 如果拉取请求在 fork 主分支上,如何找到它的启动 SHA - How to find a Pull Request start SHA if it is on the fork master branch
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM