Jenkins在稀疏结账后Git Checkout不工作

时间:2017-10-10 16:15:29

标签: git

我通过詹金斯做了稀疏结账。我可以看到我指定的模块是结帐。 现在我想从远程检查一些其他文件,这是jenkins先前使用以下命令检出:

  

git checkout dbo.tmp_ptr1307_exclude_client_ToBePurged.sql   这给了我错误   “与git已知的任何文件都不匹配”

我尝试传递sh键,如: 它结帐be4055c069ce9b9abd3baf727cfc65319f6c1dd0 dbo.tmp_ptr1307_exclude_client_ToBePurged.sql 给我同样的错误。

1 个答案:

答案 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