Skip to content

Installation

Tharawut P edited this page Nov 23, 2020 · 5 revisions

Clone and install the dotfiles

  1. Create alias to ensure that the git bare repository works without problem.
$ echo 'alias dotfiles="/usr/bin/git --git-dir=$HOME/.dotfiles.git --work-tree=$HOME"' >> $HOME/.zshrc
  1. Reload the shell settings to use that alias.
$ source ~/.zshrc
  1. Add .dotfiles.git directory to .gitignore to prevent recursion issues.
$ echo ".dotfiles.git" >> .gitignore
  1. Clone the repo.
$ git clone --bare https://github.com/xcession/dotfiles.git $HOME/.dotfiles.git
  1. Checkout the repo.
$ dotfiles checkout

If you already have configuration files with identical names, checkout will fail. Backup and remove those fils. Skip backup if you don't need them.

  1. Prevent untracked files from showing up on dotfiles status.
$ dotfiles config --local status.showUntrackedFiles no

Choosing dotfiles branch

For macOS dotfiles:

$ dotfiles checkout macos

For Linux dotfiles:

$ dotfiles checkout linux

Clone this wiki locally