# Hugging Face Space Keeps Using an Old Commit Despite Redeploys

**URL:** <https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695>\
**Category:** Beginners\
**Created:** [February 8, 2025, 12:47pm UTC](https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695 "2025-02-08T12:47:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martim-Ramos-Neural](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/martim-ramos-neural/32/37664_2.png) [@Martim-Ramos-Neural](https://discuss.huggingface.co/u/Martim-Ramos-Neural)\
**Post date:** [February 8, 2025, 12:47pm UTC](https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695/1 "2025-02-08T12:47:47Z")

</div>

#### **Description**

I’m running a **FastAPI** app in a **Docker Space** on Hugging Face, and I’m experiencing an issue where my Space **keeps using an old commit** , even after pushing new commits and triggering a redeploy.

#### **Steps Taken**

1. I have **committed and pushed** multiple updates:

```auto
git add .
git commit -m "Trigger redeploy"
git push origin main

```

1. I even **removed all remote files** and pushed a fresh commit:

```auto
git rm -r *
git commit -m "Remove all remote files"
git push origin main

```

1. Checked my commit history, and the latest commit is correct:

```auto
git log --oneline -n 5

```

1. Triggered a **Factory Rebuild** in my Hugging Face Space.
2. Despite all this, my Space **still picks an old version of my repo** when it builds.

#### **Possible Causes?**

#### **Question**

Has anyone faced this before? How can I **force my Hugging Face Space to rebuild with the latest commit**?

Thanks in advance for any help! 🚀

---

<div class="post-metadata">

**Author:** ![nnilayy](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nnilayy/32/39238_2.png) [@nnilayy](https://discuss.huggingface.co/u/nnilayy)\
**Post date:** [February 8, 2025, 9:15pm UTC](https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695/2 "2025-02-08T21:15:09Z")

</div>

Hey @Martim-Ramos-Neural,  
I ran into a similar issue previously where the space was stuck on `Building` status and even after trying `Factory Rebuild` and `Restart This Space`, nothing helped. The only thing that worked for me was creating a new Space and pushing the latest code there.

If feasible, you might want to try this as a last resort.

---

<div class="post-metadata">

**Author:** ![neoneye](https://avatars.discourse-cdn.com/v4/letter/n/ee7513/32.png) [@neoneye](https://discuss.huggingface.co/u/neoneye)\
**Post date:** [February 13, 2025, 4:25pm UTC](https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695/3 "2025-02-13T16:25:28Z")

</div>

Same here. In my Logs, the Commit SHA shows an old commit.

I have tried Restarting the space, and pushing new commits, but no luck.

Update: I think it was because I was both logged in with both Chrome and Firefox. Only having 1 page open with the HF space while deploying seemed to make a difference. Possible a web socket issue.

---

<div class="post-metadata">

**Author:** ![Martim-Ramos-Neural](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/martim-ramos-neural/32/37664_2.png) [@Martim-Ramos-Neural](https://discuss.huggingface.co/u/Martim-Ramos-Neural)\
**Post date:** [February 28, 2025, 3:20pm UTC](https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695/4 "2025-02-28T15:20:04Z")

</div>

" SOLVED ". Only happens with DEV mode enabled.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [March 1, 2025, 3:20am UTC](https://discuss.huggingface.co/t/hugging-face-space-keeps-using-an-old-commit-despite-redeploys/139695/5 "2025-03-01T03:20:33Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
