0

I am trying to create a bare repository for managing my dotfiles.

git-dir is $HOME/.cfg.

work-tree is $HOME.

So, the only way I could get my README to appear in Github was by saving it in the work-tree. i.e.., home directory. but I don't want to have a README file in my ~. So, is there a way to save it in the git-dir folder yet get the Github to show it when I open my repository?

Sai Vishnu
  • 11
  • 2
  • @SamuelLiew i don't think they are similar. – Sai Vishnu Nov 25 '22 at 17:07
  • 2
    Does this answer your question? [How to add README.md on github but not have same README.md in home directory while using a bare git repository for managing dotfiles?](https://stackoverflow.com/questions/62561933/how-to-add-readme-md-on-github-but-not-have-same-readme-md-in-home-directory-whi) – Claw Jan 09 '23 at 19:33

2 Answers2

0

No, you can not save readme in a different folder if you want it to be shown on your repository's home page

k.oncorp
  • 17
  • 3
0

According to the docs, you can use the .github folder for your README file.

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.

You can read more info about what can go in the .github folder here.

mattmc3
  • 17,595
  • 7
  • 83
  • 103