I manage my dotfiles using git in a bare repository. See article by Harfang Perch for details on this method.
It works great but I'd like to add a README.md to the root of the repository on github.
How do I add a README.md to the github repository root directory but not have that file show up in my home directories?
If I push a README.md to github then delete the README.md in my home directory this will result in
deleted: README.md
messages from git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME status which I'd prefer to avoid.
As far as I'm aware github only renders README and README.md files in the repository root (and sub-directories but that's not relevant for this question).
I haven't seen other github dotfile bare repositories with README.md files but I've only checked 5.
Github wiki pages don't solve this problem unless there is some magic to display them in the root of the repository using a hidden .dotfile. Perhaps I'm grasping at straws but, is there any way to link and display a gist in the repository root directory on github?
I don't currently use gitlab but moving to gitlab, or a similar git hosting service, is a possibility if they have support for this that github does not.
You can put your README file in a .github folder and it will be automatically detected on github to be displayed on your repo main view
The Readme.md displayed by default on GitHub is the one in the master branch.
You could create a home branch that wouldn't have the Readme, and use that branch as a work branch.
You would probably want to merge to master on a regular basis, you could add one or two convenient aliases to do this in one go, either when committing or when pushing.
You could try to get clever with subtrees too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With