Unable to find from Branch - fatal: Not a valid object name HEAD^\n #670
anustupgit
started this conversation in
General
Replies: 2 comments
-
Hi @anustupgit, We have a dedicated section about CI specificities to help deal with all those aspects. Does this pipeline fetch all the history or only the last commit ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I just faced the same issue with Azure Pipelines.
What helped is ensuring that I fetch the history as Azure by default uses Shallow Fetch so you have to ensure to overwrite shallow fetch at the job level:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @scolladon , my code is unable to find from branch and it errors out with :
{
"error": "fatal: Not a valid object name HEAD^\n",
"output": ".",
"success": false,
"warnings": []
}
Below is my yml file :
pr:
autoCancel: "true"
branches:
include:
paths:
exclude:
- README.md
- SFDQ.yml
stages:
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/QA'))
jobs:
steps:
task: NodeTool@0
inputs:
versionSpec: '16.x'
checkLatest: true
bash:
npm install sfdx-cli --global
displayName: Install Salesforce CLI
bash:
sfdx config:set restDeploy=false --global
displayName: Use SOAP API for Deployment
bash:
displayName: Authorize Salesforce DeployTestOrg Org
bash: echo 'y' | sfdx plugins:install sfdx-git-delta
displayName: Installing sfdx-git-delta
bash: sfdx sgd:source:delta --to "HEAD" --from HEAD^ --output .
displayName: Checking for delta change
bash: cat package/package.xml
displayName: Creating Delta Package
bash: cat destructiveChanges/destructiveChanges.xml
displayName: Creating Delta Destructive Package
bash:
sfdx force:source:convert --manifest=package/package.xml --outputdir=deltaChange
displayName: Convert Delta Code
bash:
sfdx force:source:deploy -p deltaChange -w 10 -u *************************************
displayName: Deploy source code to DeployTestOrg Org
Beta Was this translation helpful? Give feedback.
All reactions