What happened?
We have two YAML pipelines that checkout the same Git repository but with different lfs settings:
# Pipeline A
steps:
- checkout: self
lfs: false
# Pipeline B
steps:
- checkout: self
lfs: true
On the agent, Pipeline A runs before Pipeline B and they both checkout the same commit into the same directory. However, after the checkout of Pipeline B, the files that are tracked by Git LFS still contain the references to the Git LFS objects rather than the actual file content.
This happens because the checkout task of Pipeline B only runs git lfs fetch origin [ref], which does not update the working copy.
A possible solution would be to run git lfs checkout afterwards or to replace git lfs fetch origin [ref] with git lfs pull origin [ref].
Versions
Agent version 4.258.1 / Windows 10
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
No response
Version controll system
No response
Relevant log output