944 B
944 B
title:: DotFiles updated:: 2021-08-04 14:37:25+00:00 created:: 2020-08-19 11:26:42+00:00
https://www.atlassian.com/git/tutorials/dotfiles install git and git-lfs
apt install git git-lfs
setup the directory and alias
git init --bare $HOME/.cfg
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.bashrc
example of loading stuff into the repo
config status
config add .vimrc
config commit -m "Add vimrc"
config add .bashrc
config commit -m "Add bashrc"
config push
init a new machine with the repo
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
echo ".cfg" >> .gitignore
git clone --bare git@github.com:sstent/dotfiles.git $HOME/.cfg
config checkout