简体   繁体   English

Jenkins稀疏签出后,Git签出不工作

[英]Git Checkout Not Working after sparse checkout by Jenkins

I did sparse checkout through Jenkins. 我通过詹金斯做了稀疏的结帐。 I can see module which I had specified is checkout. 我可以看到我指定的模块是结帐。 Now I want to checkout some other file from remote which is not earlier checkout by jenkins using below command: 现在,我想使用以下命令从远程签出其他文件,这不是jenkins之前签出的文件:

git checkout dbo.tmp_ptr1307_exclude_client_ToBePurged.sql which give me error as "did not match any file(s) known to git" git checkout dbo.tmp_ptr1307_exclude_client_ToBePurged.sql,它给我的错误是“与git已知的任何文件都不匹配”

I tried passing sh key as well like: it checkout be4055c069ce9b9abd3baf727cfc65319f6c1dd0 dbo.tmp_ptr1307_exclude_client_ToBePurged.sql give me same error. 我也尝试传递sh键,就像:它结帐be4055c069ce9b9abd3baf727cfc65319f6c1dd0 dbo.tmp_ptr1307_exclude_client_ToBePurged.sql也给我同样的错误。

If you want to ignore your sparse-checkout configuration, use the --ignore-skip-worktree-bits flag, like so: 如果要忽略稀疏签出配置,请使用--ignore-skip-worktree-bits标志,如下所示:

git checkout --ignore-skip-worktree-bits -- dbo.tmp_ptr1307_exclude_client_ToBePurged.sql

In sparse checkout mode, git checkout -- <paths> would update only entries matched by <paths> and sparse patterns in $GIT_DIR/info/sparse-checkout. 在稀疏签出模式下, git checkout -- <paths>将仅更新与<paths>匹配的条目以及$ GIT_DIR / info / sparse-checkout中的稀疏模式。 This option ignores the sparse patterns and adds back any files in <paths> . 此选项将忽略稀疏模式,并添加回<paths>所有文件。

https://git-scm.com/docs/git-checkout#git-checkout---ignore-skip-worktree-bits https://git-scm.com/docs/git-checkout#git-checkout---ignore-skip-worktree-bits

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM