diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 72 | 
1 files changed, 62 insertions, 10 deletions
@@ -1,21 +1,73 @@  # dotfiles -A Git repository to track my personal GNU/Linux 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. -## Usage +## 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`: -### Installation  ```bash -	cd ~  # switch to home folder -	git clone --bare https://cgit.xengineering.eu/dotfiles  # clone the bare repository -	git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME checkout  # checkout dotfiles to your home  -																  # (append '-f' to overwrite local ones) -	source ~/.bashrc  # enable configuration for current shell +	ln -s ~/.config/.bash_profile ~/.bash_profile +	ln -s ~/.config/.bashrc ~/.bashrc +	ln -s ~/.config/.vimrc ~/.vimrc +	ln -s ~/.config/.zshrc ~/.zshrc  ``` -### Update +## Update + +Simply run this command from any location on your computer: +  ```bash -	dotfiles pull +	git -C ~/.config pull  ``` +## Add or update files + +You can use `~/.config` like a normal Git repository.  | 
