You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Azure DevOps管道无法检出.sqlfluff等以点开头的文件求助

解决Azure DevOps检出隐藏文件(如.sqlfluff)的问题

方案1:手动执行git检出命令

在现有checkout步骤后添加脚本,强制检出所有文件(包括隐藏文件):

- checkout: self
    displayName: 'Checkout & Build.Reason: $(Build.Reason) & Build.SourceBranchName: $(Build.SourceBranchName) & System.PullRequest.TargetBranch: $(System.PullRequest.TargetBranch)'
    persistCredentials: true
    clean: true
    fetchDepth: 0

- script: |
    git checkout HEAD -- .
  displayName: 'Checkout all files including hidden ones'
  workingDirectory: $(Build.SourcesDirectory)

方案2:配置git支持隐藏文件

在checkout前设置git配置,确保它能处理隐藏文件:

- script: |
    git config core.hiddenfiles true
  displayName: 'Enable git to track hidden files'
  workingDirectory: $(Build.SourcesDirectory)

- checkout: self
    displayName: 'Checkout & Build.Reason: $(Build.Reason) & Build.SourceBranchName: $(Build.SourceBranchName) & System.PullRequest.TargetBranch: $(System.PullRequest.TargetBranch)'
    persistCredentials: true
    clean: true
    fetchDepth: 0

方案3:检查仓库的.gitignore规则

确认仓库根目录的.gitignore文件中没有包含.sqlfluff或通用隐藏文件的排除规则,如果有,移除对应条目后重新提交仓库。

内容的提问来源于stack exchange,提问作者Aditya Raj

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.21 14:20:59