User-specific application configuration is traditionally stored in so called dotfiles and stored in the home directory. By moving these to a separate directory, you can keep your dotfiles out of your home directory and still have access to them.
You can also maintain them in a git repository and use them in other situations like for GitHub Codespaces or VSCode devcontainers. Both can use a plain git repository to retreive and install the dotfiles from in the container.
By default, the $XDG_CONFIG_HOME/git/ignore
file is used as a global gitignore file but requires a script to be run to set it up with a separate command. When the separate command install.sh
is being used then all other files have to be setup via the install.sh
script as well.
The alternative is to use the ~/.gitignore
file as a global gitignore file. This can be done by setting the core.excludesfile
configuration option to the path of the ~/.gitignore
file with the command below to set it globally.
$ git config --global core.excludesfile ~/.gitignore
The .gitconfig
file is used to configure git. And the ~/.gitconfig
file is updated in the final step by the GitHub Codespaces to set the user name and email address.
- EditorConfig
- gitattributes
- gitignore can be set per project or directory, or also global as used here