Skip to content

nickw8/dotfiles-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

I love me some dotfiles testing. Got this strategy from this cool article.

Setup:

First you need to create a bare repo to track your dotfiles

mkdir $HOME/.dotfiles
git init --bare $HOME/.dotfiles

Then create an alias (and add it to your zsh or bash aliases) so you dont have to keep typing all the git arguments everytime

alias git.dot='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

Set your repo to not show untracked files (or you will see all the files in you $HOME directory)

git.dot config --local status.showUntrackedFiles no

Usage:

You can now use your alias with normal git commands to manage your dotfiles

git.dot status
git.dot commit -am "dotfiles are the best"
git.dot push
git.dot pull

I added some other aliases for the most common actions. NOTE you only have to git.dot add new files, modified or deleted files will be picked up with git.dot commit -am

alias gda='git.dot add -f'
alias gds='git.dot status'
alias gdl='git.dot pull'
alias gdp='git.dot push'
alias gdc='git.dot commit -am'

Setup on New Computer:

Clone your bare repo

git clone --bare https://github.com/nickw8/dotfiles.git $HOME/.dotfiles

Make sure you have the alias set up on the new computer, then checkout the code

git.dot checkout

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published