2. Copy HTTPS or SSH clone link of your fork.
1. Initialize bare git directory.
git init --bare $HOME/.dotfiles
2. Add alias to .bashrc or .zshrc (if you use ZSH as shell) to be able to refer the repo by config
.
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
3. Set git to show only tracked files in commands.
config config --local status.showUntrackedFiles no
4. Set your fork as remote repo. I used my repo's HTTPS clone link in this example. You should use the link you copied.
config remote add origin https://github.com/arensonzz/dotfiles.git
config pull origin master
Use config
alias instead of git
like we normally do.
config status
config add ~/.tldr
config commit -m "Add tldr config"
config add ~/.fzf
config commit -m "Add fzf config"
config push origin master