Skip to content

O-Hannonen/dotfiles

Repository files navigation

dotfiles 🔥

This solution for storing dotfiles is inspired by this comment on Hacker News!

Quick Start 🚀

Initial setup

You MUST complete these few steps before attempting to follow any of the instructions below. To initialize your machine:

  1. Add a dotfile alias. The .bashrc and .zshrc in this repo already contain the configuration, but if you don't have the configurations pulled from here, you'll have to set it yourself.

    For bash

    echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.bashrc

    For zsh

    echo "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'" >> $HOME/.zshrc

    For current scope

    alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
  2. Install homebrew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Install brew bundle

    brew tap Homebrew/bundle

Usage

  1. Clone this repo
    git clone --bare https://github.com/O-Hannonen/dotfiles.git $HOME/.dotfiles
  2. Checkout the content
    dotfiles checkout
  3. Install contents of Brefile
    brew bundle install

Updating

  1. Use basic git commands to commit changes
    dotfiles add .zshrc
    dotfiles commit -m "feat: updates .zshrc"
    dotfiles push
  2. That's it!

Setting up a similar repo

  1. Initialize git repo
    git init --bare $HOME/.dotfiles
  2. Hide untracked files
    dotfiles config --local status.showUntrackedFiles no
  3. Create Brewfile which contains everything you've installed with homebrew
    brew bundle dump -f
  4. Use basic git commands to add remote commit changes. You should add all the files here you want to include in your dotfiles (also the newly created Brewfile)
    dotfiles remote add origin [email protected]:<USERNAME>/dotfiles.git
    dotfiles commit -m "feat: initial commit"
    dotfiles push -u origin main

About

My precious dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published