Simple way to manage all of your dotfiles
¶
You can learn how I manage my dotfiles in the simplest way that I know.
✅ Step-by-Step: Setup Your Dotfiles (Including Git) on a New Machine¶
Install Git
¶
Install as per your package manager | |
---|---|
Clone Your Dotfiles Repo
¶
Example using SSH or HTTPS:
Choose your preference | |
---|---|
Run the Bootstrap Script
¶
Change directory and run it like this:
cd ~/repositories/homelab
chmod +x bootstrap.sh
./bootstrap.sh
This will:
- Back up existing configs (
.bashrc.bak
, etc.) - Symlink your dotfiles into place
if you cant run it:
Chech if the file is executable by running ls -l, and if it isnt't run: chmod +x nameofthefile
Set Up Git Credential Storage (Optional but Handy)
¶
If you use HTTPS and want Git to remember your credentials:
Set the type of credential helper you want, in this case, store | |
---|---|
After this, Git will prompt you once for credentials, then store them in plain text at:
Since your .gitconfig
is symlinked already, it will also use your name and email from there.
Check for the file
If after your first push you go to your home directory and you don't see the file, just manually create it yourself adding the credentials in the following way: https://username:token@github.com
Verify Git Config ✅¶
run the following command: | |
---|---|
This will show you:
- Where each config is coming from
- That your symlinked
~/.gitconfig
is being used