# Git clone + switch branch to PR

**URL:** <https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278>\
**Category:** 🤗Hub\
**Created:** [October 15, 2024, 8:24pm UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278 "2024-10-15T20:24:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelfeil](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/michaelfeil/32/32978_2.png) [@michaelfeil](https://discuss.huggingface.co/u/michaelfeil)\
**Post date:** [October 15, 2024, 8:24pm UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278/1 "2024-10-15T20:24:34Z")

</div>

I contributed to a remote repo via pr.  
I opened the PR in the web interface.

> **[vidore/colpali-v1.2-merged · add\_configs](https://huggingface.co/vidore/colpali-v1.2-merged/discussions/2)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

All good so far.

Now I want to contribute another file which I have on my local.  
I want to  
`git fetch && git checkout -b refs/pr/2` add the file and then `git add * && git commit -m 'message'`

I encounter issues with not being able to fetch and checkout.

---

<div class="post-metadata">

**Author:** ![severo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/severo/32/27449_2.png) [@severo](https://discuss.huggingface.co/u/severo)\
**Post date:** [October 16, 2024, 7:42am UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278/2 "2024-10-16T07:42:57Z")

</div>

have you cloned the repository first? just in case, the instructions are here: [vidore/colpali-v1.2-merged · Hugging Face](https://huggingface.co/vidore/colpali-v1.2-merged?clone=true)

---

<div class="post-metadata">

**Author:** ![michaelfeil](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/michaelfeil/32/32978_2.png) [@michaelfeil](https://discuss.huggingface.co/u/michaelfeil)\
**Post date:** [October 16, 2024, 2:49pm UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278/3 "2024-10-16T14:49:53Z")

</div>

Of course! Upon git fetch, i only see the main branch available

---

<div class="post-metadata">

**Author:** ![severo](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/severo/32/27449_2.png) [@severo](https://discuss.huggingface.co/u/severo)\
**Post date:** [October 16, 2024, 4:38pm UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278/4 "2024-10-16T16:38:54Z")

</div>

git fetch -a maybe

---

<div class="post-metadata">

**Author:** ![michaelfeil](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/michaelfeil/32/32978_2.png) [@michaelfeil](https://discuss.huggingface.co/u/michaelfeil)\
**Post date:** [October 29, 2024, 5:01pm UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278/5 "2024-10-29T17:01:49Z")

</div>

Also didn’t work.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [October 30, 2024, 12:02am UTC](https://discuss.huggingface.co/t/git-clone-switch-branch-to-pr/112278/6 "2024-10-30T00:02:37Z")

</div>

Maybe same as this issue.

> [@Build Error - Error while cloning space repository for all spaces](https://discuss.huggingface.co/t/build-error-error-while-cloning-space-repository-for-all-spaces/79004):
>
> All my spaces are failing to build with the same error message. Even when building a new app and having a single streamlit line it fails to build. [image]
