# Syncing Github Repo with Huggingface Repo

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsyncing-github-repo-with-huggingface-repo%2F137841%3E%5C
**Category:** Spaces\
**Created:** [January 29, 2025, 3:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsyncing-github-repo-with-huggingface-repo%2F137841 "2025-01-29T03:55:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tejacherukuri](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@tejacherukuri](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftejacherukuri)%5C
**Post date:** [January 29, 2025, 3:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsyncing-github-repo-with-huggingface-repo%2F137841%2F1 "2025-01-29T03:55:30Z")

</div>

Hello there,

I am trying to make my github repo sync with huggingface space, so I can get the new changes deployed directly after a push to github.

I followed the tutorial here and setup the actions pipeline- [Managing Spaces with Github Actions](https://huggingface.co/docs/hub/en/spaces-github-actions)

My problem is with the README.md file, I want a different README.md file for my github repo cause the README.md file inside spaces is related to configuration. I am having hardtime maintaining a single version and making sure that works for both repos. How do I effectively manage in this case?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [January 29, 2025, 5:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsyncing-github-repo-with-huggingface-repo%2F137841%2F2 "2025-01-29T05:26:18Z")

</div>

I think the simplest thing is **.gitignore** , but this just ignores **README.md** …  
It’s a little different from managing multiple repositories at the same time.  
[https://git-scm.com/docs/gitignore](https://git-scm.com/docs/gitignore)

---

<div class="post-metadata">

**Author:** ![tejacherukuri](https://avatars.discourse-cdn.com/v4/letter/t/4bbf92/32.png) [@tejacherukuri](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftejacherukuri)%5C
**Post date:** [January 29, 2025, 5:49am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsyncing-github-repo-with-huggingface-repo%2F137841%2F3 "2025-01-29T05:49:39Z")

</div>

Yeah, I don’t think that’s the way to go.

---

<div class="post-metadata">

**Author:** ![juhoinkinen](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/juhoinkinen/32/32436_2.png) [@juhoinkinen](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fjuhoinkinen)%5C
**Post date:** [January 30, 2025, 9:00pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fsyncing-github-repo-with-huggingface-repo%2F137841%2F4 "2025-01-30T21:00:00Z")

</div>

You could achieve this by placing the README intended for GitHub in `.github` directory, and the one for Hugging Face Hub in the root:

> If you put your README file in your repository’s hidden `.github`, root, or `docs` directory, GitHub will recognize and automatically surface your README to repository visitors.  
> If a repository contains more than one README file, then the file shown is chosen from locations in the following order: the `.github` directory, then the repository’s root directory, and finally the `docs` directory.

> **[About READMEs - GitHub Docs](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)**
>
> You can add a README file to your repository to tell other people why your project is useful, what they can do with your project, and how they can use it.
