Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.28 KB

README.md

File metadata and controls

49 lines (33 loc) · 1.28 KB

Version control your development environment

Why?

  • setup a new laptop
  • share your development environment with others
  • revert a failed PDE experiment

Approach

  • One repo consolidates all config and dot files - outside its .git directory location.
  • No symlinks

References

Setup

cd ~/workspace
git init --bare dotfiles.git

git status should not display all untracked files

git --git-dir=$HOME/workspace/dotfiles.git/ --work-tree=$HOME config status.showUntrackedFiles no
git --git-dir=$HOME/workspace/dotfiles.git/ --work-tree=$HOME remote add origin [email protected]:borisdev/dotfiles.git

add this alias to your .bashrc or .zshrc...

alias dotgit='git --git-dir=$HOME/workspace/dotfiles.git/ --work-tree=$HOME'

...then source your .bashrc or .zshrc...

...remember to replace dotgit with git in the following commands...

dotgit add ~/.gitconfig
dotgit commit -m "Git dotfiles"
dotgit push origin master