# dotfiles A Git repository to track my personal GNU/Linux dotfiles. It should be located in the config directory `~/.config` where programs should store their configuration files. ## Migrate from earlier dotfiles versions The dotfiles project used to create a bare Git repository in `~/dotfiles.git` and a worktree in `~` to care about programs that place configuration files in `~` directly. Now dotfiles does not care about them anymore. It is much cleaner to save configuration files in `~/.config` and much simpler to use a simple Git repository than using a bare repo with worktree. Use this command to remove a bare repository based installation of dotfiles: ``` rm -rf ~/dotfiles.git ``` After this step you can proceed with installation like described below. ## Installation Start by switching to your config directory and initialize an empty Git repository in it: ```bash mkdir -p ~/.config # create if it does not exist cd ~/.config git init ``` Then you should add the remote repository from xengineering.eu and fetch the content: ```bash git remote add origin https://cgit.xengineering.eu/dotfiles git fetch ``` Checkout the preferred branch (default is `main`). Add ` --force` after `checkout` if the following command fails and you want to overwrite existing files: ```bash git checkout main ``` Finally you should link some configuration files from programs which expect their config file in `~` instead of `~/.config`: ```bash cd ~ ln -s .config/.bash_profile .bash_profile ln -s .config/.bashrc .bashrc ln -s .config/.vimrc .vimrc ln -s .config/.zshrc .zshrc ``` ## Update Simply run this command from any location on your computer: ```bash git -C ~/.config pull ``` ## Add or update files You can use `~/.config` like a normal Git repository.