简体   繁体   中英

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:

git checkout dbo.tmp_ptr1307_exclude_client_ToBePurged.sql which give me error as "did not match any file(s) known to git"

I tried passing sh key as well like: it checkout be4055c069ce9b9abd3baf727cfc65319f6c1dd0 dbo.tmp_ptr1307_exclude_client_ToBePurged.sql give me same error.

If you want to ignore your sparse-checkout configuration, use the --ignore-skip-worktree-bits flag, like so:

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. This option ignores the sparse patterns and adds back any files in <paths> .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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