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.
.dotfiles
directory, and create symlinks like$HOME/.bashrc -> $HOME/.dotfiles/.bashrc
as needed. You can write a script to create all the necessary symlinks and store that in the repository as well. – Jonell~/.config
for configuration files, which means you can simply clone your.dotfiles
as.config
instead. Such programs will probably honor a standard environment variable that specifies which directory contains the configuration, meaning the only file you need in~
directly is the shell configuration file sets that environment variable.) – Jonell