I have a question about using a dotfiles repository with GitHub Codespaces. According to the official GitHub documentation, if I create a dotfiles repository and enable it in my settings, it should be automatically downloaded and the install script should be run whenever I create a new Codespaces project.
I have already configured my dotfiles repository and enabled it in my settings, but when I create a new Codespaces project, I am not able to see my dotfiles repository in the Codespace. I have checked all the files and folders that I can think of, but I can’t find it.
Can anyone tell me what the exact location of the dotfiles repository is in a Codespace? Is it possible to set the location of the repository in the devcontainer.json file?
Thank you for your help!
The dotfiles will be cloned to /workspaces/.codespaces/.persistedshare/dotfiles. Only those files that start with dot (.) will get symlinked to $HOME. But if any of these bootstrap scripts named install.sh, install, bootstrap.sh, bootstrap, script/bootstrap, setup.sh, setup, and script/setup exists, the bootstrap script will get executed instead of dotfiles getting symlinked to $HOME.
Based on your dotfiles, either you move all your dotfiles to root directory, or you can keep the folders, but you need to create a bootstrap script so that dotfiles will get put to the proper places.
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