What you'll build
You'll create your own dotfiles repository: a place on GitHub where you'll store all your configuration files (.zshrc, .gitconfig, etc.). You'll copy your current configurations, create an automatic installation script, and push everything to GitHub. When you're done, you'll have a system that lets you configure any new computer with a single command. Every time you improve a configuration, you update the repo and it stays synced forever.
What are dotfiles?
| File | What it's for |
|---|---|
.bashrc / .zshrc | Terminal configuration |
.gitconfig | Your name, email, Git aliases |
.vimrc | Vim configuration |
.ssh/config | SSH connection shortcuts |
Step 1: Create a dotfiles repository
mkdir ~/dotfiles
cd ~/dotfiles
git init
Step 2: Copy your config files
# Copy your shell config
cp ~/.zshrc ~/dotfiles/ # or .bashrc if using bash
# Copy Git config
cp ~/.gitconfig ~/dotfiles/
Step 3: Create an install script
Create install.sh:
#!/bin/bash
# Create symlinks to dotfiles
DOTFILES_DIR="$HOME/dotfiles"
ln -sf "$DOTFILES_DIR/.zshrc" "$HOME/.zshrc"
ln -sf "$DOTFILES_DIR/.gitconfig" "$HOME/.gitconfig"
echo "Dotfiles installed!"
Make it executable:
chmod +x install.sh
Step 4: Push to GitHub
git add .
git commit -m "My personal configuration"
git push origin main
On a new computer
git clone https://github.com/YOUR-USERNAME/dotfiles.git ~/dotfiles
cd ~/dotfiles
./install.sh
Done! Your configuration is applied.
Useful .zshrc configurations
# Useful aliases
alias ll="ls -la"
alias gs="git status"
alias gc="git commit"
alias gp="git push"
# Export API keys
export GEMINI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"
Next step
โ Static Web Page โ Your first web page