# Error fetching branch after trying to update submodule

**URL:** <https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370>\
**Category:** Support\
**Tags:** git, netlify-newbie, deployment\
**Created:** [November 21, 2019, 3:15pm UTC](https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370 "2019-11-21T15:15:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddie](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@eddie](https://answers.netlify.com/u/eddie)\
**Post date:** [November 21, 2019, 3:15pm UTC](https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370/1 "2019-11-21T15:15:11Z")

</div>

I need advice to debug deploy [Netlify App](https://app.netlify.com/sites/gallant-kirch-586987/deploys/5dd69f2401bc1900080e9b40)

Hi there,

I updated a theme which I added as a submodule and I am getting an error with preparing the repo. I am deploying this website using Hugo. my original intention was to change the footer on the sub module but I seem to have broken something. Of course, I still want to update the footer but, I mostly want to get my site back into a working state.

I believe its an issue with the submodule, I tried, reverting the commit, git pulling the submodule and updating it but I’ve had no success.

I appreciate any help you can give me! Thank you in advanced.

9:28:52 AM: Build ready to start  
9:28:58 AM: build-image version: 9e0f207a27642d0115b1ca97cd5e8cebbe492f63  
9:28:58 AM: build-image tag: v3.3.2  
9:28:58 AM: buildbot version: a2bab682ae0761baa4d123ebd00c57be933655dc  
9:28:58 AM: Fetching cached dependencies  
9:28:58 AM: Starting to download cache of 104.3MB  
9:28:59 AM: Finished downloading cache in 678.668723ms  
9:28:59 AM: Starting to extract cache  
9:29:02 AM: Finished extracting cache in 3.217181833s  
9:29:02 AM: Finished fetching cache in 3.951399079s  
9:29:02 AM: Starting to prepare the repo for build  
9:29:02 AM: Preparing Git Reference refs/heads/master  
9:29:04 AM: Error fetching branch: [GitHub - etseng02/portfolio: Repository for the version 1 of my personal homepage. Made using JAMstack. Deployed on netlify. Visit https://github.com/etseng02/portfolio-v2 for my updated homepage or https://eddietseng.com for the deployed version.](https://x-access-token:v1.107e39111d510ef55b21e27c52e5db6e28b0312a@github.com/etseng02/portfolio) refs/heads/master  
9:29:04 AM: Failing build: Failed to prepare repo  
9:29:04 AM: failed during stage ‘preparing repo’: exit status 1  
9:29:04 AM: Finished processing build request in 6.084695546s

---

<div class="post-metadata">

**Author:** ![eddie](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@eddie](https://answers.netlify.com/u/eddie)\
**Post date:** [November 21, 2019, 5:01pm UTC](https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370/2 "2019-11-21T17:01:40Z")

</div>

Solved. It turns out that the cache was pointing to the wrong commit. Cleared cache on netlify before deploying solved the issue.

---

<div class="post-metadata">

**Author:** ![laura](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/laura/32/6274_2.png) [@laura](https://answers.netlify.com/u/laura)\
**Post date:** [November 21, 2019, 7:30pm UTC](https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370/3 "2019-11-21T19:30:04Z")

</div>

Thank you for posting the solution!

---

<div class="post-metadata">

**Author:** ![naniroot](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/naniroot/32/6751_2.png) [@naniroot](https://answers.netlify.com/u/naniroot)\
**Post date:** [February 14, 2020, 5:06am UTC](https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370/4 "2020-02-14T05:06:22Z")

</div>

In case you don’t know how to clear cache and deploy. Go to your deploys page, top right find the button trigger deploys and click clear cache and deploy site.

deploys page -\> trigger deploy -\> clear cache and deploy site

---

<div class="post-metadata">

**Author:** ![kpm](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/kpm/32/7049_2.png) [@kpm](https://answers.netlify.com/u/kpm)\
**Post date:** [February 21, 2020, 2:07am UTC](https://answers.netlify.com/t/error-fetching-branch-after-trying-to-update-submodule/5370/5 "2020-02-21T02:07:58Z")

</div>

I’m having the same problem, but my submodule edits aren’t found on github. Did you have to fork the themes repository to get it to work?
