Personal linux dotfile configs
- bash
- zsh (ohmyzsh must be installed)
- alacritty
- starship (must install starship)
- Volta (node version manager)
- husky config (vscode, codium npx error fix)
- VSCodium settings
- Helix editor config
- Neovim config (using lazy.vim as package manager)
- Zellij (must isntall Zellij)
Optional: Install the required software using the provided script.
./scripts/pre_install.sh
- Create a custom alias in your
.bashrc
or.zshrc
. This works simply creates an alias forgit
that targets only the.dotfiles
folder:
alias dotfile='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
- Avoid recursion problems by making sure that the source repository ignores the folder where the files will be cloned:
echo ".dotfiles" >> .gitignore
- Clone the repository into a bare repository:
git clone --bare <git-url> $HOME/.dotfiles
-
Make sure that the alias in your
.bashrc
or.zshrc
in step 1 still exists, if not, readd it. -
Checkout the content from the bare repository to
$HOME
, this puts all the dotfiles in the designated folders:
dotfile checkout
- The above command might give you errors:
error: The following untracked working tree files would be overwritten by checkout:
.bashrc
.gitignore
Please move or remove them before you can switch branches.
Aborting
- This is caused if the
$HOME
folder might already contain the files from the repo. To fix the issue, create a backup of the files flagged if important, or simply delete it. Then rerun the command again:
dotfile checkout
- Only track the files that you've specifically added by running the command below:
dotfile config --local status.showUntrackedFiles no
- All done! Now you can simply add, commit and push any changes:
dotfile status
dotfile add .bashrc
dotfile commit -m "Added .bashrc"
dotfile push