/dotfiles

Dotfiles for various things

Primary LanguageLua

dotfiles

dotfiles is a colleciton of my dotfiles which are intended to be used from a bare git repository.

What is a "bare" git repo?

From the Git manual:

a repository that doesn’t contain a working directory.

This means that there is no requirement to git clone into $HOME; the .git directory can live anywhere while the actual repository files can exist in $HOME. For example, if its desired that the .git directory live in $HOME/.dotfiles then this becomes the git command when interacting with the bare repository:

git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME

In order to clone this repo:

git clone --bare git@github.com:aosterhage/dotfiles.git $HOME/.dotfiles/

and then the repo files can be checked-out via the above mentioned git options:

git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout main

It will probably be desired that untracked files are not shown by default because plenty of files and directories will live in $HOME that should not be committed:

git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME config --local status.showUntrackedFiles no