Clone
6
Home
eneller edited this page 2022-08-04 08:30:43 +02:00

Welcome to the .dotfiles wiki!
This Repo is currently set up following a tutorial inspired by a Hacker News post .

Setup

This technique simply uses a bare git repository (in this case located in ~/.dotfiles).
A dotfiles alias can then be added to your respective terminalrc (e.g. .bashrc) for ease of use.

Cloning onto a new Machine

  1. Clone the repo into a bare repository in your home directory
git clone --bare git@github.com:eneller/.dotfiles.git $HOME/.dotfiles
  1. Append the following alias to your terminalrc
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
  1. Checkout the content from your repo to your home directory
dotfiles checkout
  1. Configure git to hide untracked files for this repo
dotfiles config --local status.showUntrackedFiles no

Initial setup

  1. Initialize a bare git repository in your home directory using
git init --bare $HOME/.dotfiles
  1. Append the following alias to your terminalrc
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
  1. Use git as you would normally to track your dotfiles, only using e.g. dotfiles add instead of git add

Versioning

Use git tag to mark specific commits for later checkout.