我通过詹金斯做了稀疏结账。我可以看到我指定的模块是结帐。 现在我想从远程检查一些其他文件,这是jenkins先前使用以下命令检出:
git checkout dbo.tmp_ptr1307_exclude_client_ToBePurged.sql 这给了我错误 “与git已知的任何文件都不匹配”
我尝试传递sh键,如: 它结帐be4055c069ce9b9abd3baf727cfc65319f6c1dd0 dbo.tmp_ptr1307_exclude_client_ToBePurged.sql 给我同样的错误。
答案 0 :(得分:0)
如果您想忽略稀疏结账配置,请使用--ignore-skip-worktree-bits
标志,如下所示:
git checkout --ignore-skip-worktree-bits -- dbo.tmp_ptr1307_exclude_client_ToBePurged.sql
在稀疏结账模式下,
git checkout -- <paths>
将仅更新<paths>
匹配的条目和$ GIT_DIR / info / sparse-checkout中的稀疏模式。此选项忽略稀疏模式并添加<paths>
中的所有文件。
https://git-scm.com/docs/git-checkout#git-checkout---ignore-skip-worktree-bits