diff --git a/Home.md b/Home.md index e0585de..a83b2ef 100644 --- a/Home.md +++ b/Home.md @@ -1,6 +1,34 @@ Welcome to the .dotfiles wiki!\ This Repo is currently set up following a [tutorial](https://www.atlassian.com/git/tutorials/dotfiles) inspired by a [Hacker News post](https://news.ycombinator.com/item?id=11070797) . +# 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 - -# Initial setup \ No newline at end of file +## Cloning onto a new Machine +1. Clone the repo into a **bare** repository in your home directory +``` +git clone --bare $HOME/.dotfiles +``` +> The next steps are not required if you don't want to track changes made to your dotfiles on this machine. +2. Append the following alias to your terminalrc +``` +alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' +``` +3. Checkout the content from your repo to your home directory +``` +dotfiles checkout +``` +## Initial setup +1. Initialize a bare git repository in your home directory using +``` +git init --bare $HOME/.dotfiles +``` +2. Append the following alias to your terminalrc +``` +alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' +``` +3. Use the alias to configure git to hide untracked files for this repo +``` +dotfiles config --local status.showUntrackedFiles no +``` +4. Use git as you would normally to track your dotfiles, only using e.g. `dotfiles add` instead of `git add` \ No newline at end of file