-
make sure you're in the your ~home directory , you can type
cd
or~
to go there -
git init --bare $HOME/dotfiles
you can replace dotfiles with a name of choice , I chose .dotfiles
echo alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' >> .zshrc
feel free to name the alias what ever you want , I named it dotfiles this adds an alias named config , so instead of typing
git --git-dir=home/dotfiles
all you need to do is to write config in your terminal on bash replace .zshrc with .bashrc
- restart the shell to load the new config file