Dotfiles Management
cd ~
mkdir .dotfiles
cd .dotfiles
git init --bare # initialise a bare git repo
cd -
echo "alias dotfiles='git --git-dir=/home/mx/.dotfiles --work-tree=/'" >> .bashrc
source .bashrc
# telling git not to show untracked files, 否则查看 log 时会从根目录挨个遍历
dotfiles config --local status.showUntrackedFiles no
dotfiles add ~/.vimrc
dotfiles commit -m "add .vimrc"
dotfiles ls-files
+V why_null 请备注:from博客园