Skip to content

Boostrap

Gideon Oludeyi edited this page Oct 25, 2023 · 3 revisions

Clone your dotfiles into a bare repository in a "dot" folder of your $HOME:

$ git clone --bare git@github.com:gideonoludeyi/.dotfiles.git $HOME/.dotfiles

Define the alias in the current shell scope:

$ alias dotfiles='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'

Checkout the actual content from the bare repository to your $HOME:

$ dotfiles checkout

The step above might fail with a message like:

error: The following untracked working tree files would be overwritten by checkout:
    .zshrc
    .gitignore
Please move or remove them before you can switch branches.
Aborting

This is because your $HOME folder might already have some stock configuration files which would be overwritten by Git. The solution is simple: back up the files if you care about them, remove them if you don't care.

Pull all submodules:

$ dotfiles submodule update --init --recursive

Set the flag showUntrackedFiles to no on this specific (local) repository:

$ dotfiles config --local status.showUntrackedFiles no

Warning Do NOT run dotfiles add .
Add files specifically by name

Clone this wiki locally