# Skip git clone, use local repo

**URL:** https://community.jenkins.io/t/skip-git-clone-use-local-repo/3009
**Category:** Ask a question
**Created:** [July 13, 2022, 3:47pm UTC](https://community.jenkins.io/t/skip-git-clone-use-local-repo/3009 "2022-07-13T15:47:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![hgerrald](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@hgerrald](https://community.jenkins.io/u/hgerrald)
#### Post date: [July 13, 2022, 3:47pm UTC](https://community.jenkins.io/t/skip-git-clone-use-local-repo/3009/1 "2022-07-13T15:47:43Z")

</div>

Hello, I am creating a multibranch pipeline and currently every time I build a branch with Jenkins it clones the entire repo, appending my branch name to the end of it. This results in me having 10 different cloned repos for 10 branches. Is there a way to tell Jenkins to just use the locally cloned repo on the build agent and fetch the correct branch?

My repo is huge so this checkout scm step takes forever.

---

<div class="post-metadata">

### Author: ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)
#### Post date: [July 13, 2022, 6:18pm UTC](https://community.jenkins.io/t/skip-git-clone-use-local-repo/3009/2 "2022-07-13T18:18:53Z")

</div>

See the [`skipDefaultCheckout` option](https://www.jenkins.io/doc/book/pipeline/syntax/#available-options) for Declarative Pipeline.

See the “Git in the Large” 10-15 minute presentation that will guide you to use a reference repository and may suggest other techniques that can reduce the effort to manage jobs with large git repositories

[![](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/b/ba1726796d9e15547afbd19697334299aa3be270.jpeg "Live 15-minute Demos from Jenkins World") ](https://www.youtube.com/watch?v=jBGFjFc6Jf8)

---

<div class="post-metadata">

### Author: ![hgerrald](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@hgerrald](https://community.jenkins.io/u/hgerrald)
#### Post date: [July 13, 2022, 8:13pm UTC](https://community.jenkins.io/t/skip-git-clone-use-local-repo/3009/3 "2022-07-13T20:13:04Z")

</div>

Thank you so much, Mark!
