Search code examples
gitjenkinssparse-checkout

Jenkins and Git sparse checkouts


I have a large repository in Git. How do I create a job in Jenkins that checks out just one sub-folder from the project?


Solution

  • Jenkins Git Plugin support sparse checkouts since git-plugin 2.1.0 (April, 2014). You will need git >= 1.7.0 for this feature. It is under "Additional Behaviors" -> "Sparse Checkout paths."

    screenshot

    See: Jira issue JENKINS-21809