-
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
-
config config --local status.showUntrackedFiles no
again , the first config is the name of the alias so you might need to adjust this command this one hide untracked files when you type
config status
-
config add <file or folder name here>
-
It's really up to you now , I hope you push your awesome files online !
be careful , never upload ur .SSH keys , git credentials or anything that contains personal info !