I have a repo: hello.git. I'm able to perform a sparse checkout:
sparse checkout path
: /test/test1
Now I have this in my workspace:
.../workspace/test/test1/content
I want to have the following:
.../workspace/content
Is it possible to checkout only the content of the path you describe?
This is not possible in git.
When you checkout in sparse mode, git only updates entries matched by your configuration in $GIT_DIR/info/sparse-checkout (this is set by the Git plugin on Jenkins).
Git does not support changing the root of the working tree in checkout. So when you do a sparse checkout, you will always have the whole directory structure of the files you selected.
https://git-scm.com/docs/git-checkout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With