Hello Future Me (or curious traveler from another galaxy)! Welcome to the control center of my digital spaceship! This is where I keep the settings for my command-line interfaces and tools, so they always feel familiar no matter which planet (machine) I'm on.
So you've landed on a brand new planet and you need to set up your tools. Here's how to get started:
-
Clone this repository:
First, make sure you have
gitinstalled:which git || (echo "Git is not installed. Installing now..." && sudo apt install git)
Now, clone this repo as a bare repository:
git clone --bare https://github.com/afgallo/dotfiles.git $HOME/.dotfiles -
Checkout the actual content from the bare repository to your
$HOMEdirectory:alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' dotfiles checkout
Note: If the above command complains about conflicts, it means you have pre-existing configuration files that would be overwritten by Git. Backup the conflicting files and retry the checkout command.
-
Add the alias to your
.zshrcor.bashrcso you can easily use the dotfiles command in the future:echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc
-
(Experimental) Try run
bootstrap.shas an alterative method to step 2 and 3
Remember, the universe is vast, and configurations are ever-changing. Keep exploring, and keep updating this digital spaceship! And if you meet another galactic traveler, share your knowledge!
Safe travels, Future Me! π