8000 GitHub - evokateur/dotfiles: my dotfiles
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

evokateur/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

dotfiles

This repository contains configuration files in the config branch

To deploy configuration to a new machine:

git clone git@github.com:evokateur/dotfiles.git
cd dotfiles
./bootstrap.sh

Running bootstrap.sh

  1. Clones the config branch as a bare repository into ~/.dotfiles

  2. Moves pre-existing files that would be overwritten to ~/.dotfiles-backup

  3. Checks out the files from the config branch into ~/.

  4. Configures the ~/.dotfiles repo to ignore untracked files

The .zshrc in the config branch contains a function for working with the ~/.dotfiles repo

dotfiles() {
    if [[ "$1" == "add" && "$2" == "." ]]; then
        echo "❌ Refusing to run 'dotfiles add .' — be specific!"
        return 1
    fi
    /usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME "$@"
}

as well as a corresponding alias

alias dot='dotfiles'

Some example usage below

~ $ dot status
On branch config
nothing to commit (use -u to show untracked files)
√ ~ $ dot add .
❌ Refusing to run 'dotfiles add .' — be specific!
?1 ~ $ dot add .zprofile
√ ~ $ dot status
On branch config
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	new file:   .zprofile

Untracked files not listed (use -u option to show untracked files)

About

my dotfiles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0