Startup files repository 🗄
git init --bare "$HOME/dotfiles.git"
Define alias for git
command:
alias dot='git --git-dir="$HOME/dotfiles.git" --work-tree="$HOME"'
This will gurrantee that dot
, or git
, will always find your repository no matter what the current directory is
and will treat your home directory as its working tree.
Hide untracked files:
dot config status.showUntrackedFiles "no"
Commit a file:
dot add "$HOME/.bashrc"
dot commit --message "Add .bashrc"
git clone --bare "https://github.com/<username>/dotfiles.git" "$HOME/dotfiles.git"
alias dot='git --git-dir="$HOME/dotfiles.git" --work-tree="$HOME"'
dot config status.showUntrackedFiles "no"
dot config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
Create index:
dot reset
Show working tree status:
dot status
Then either start tracking changes in a new branch:
dot checkout -b "<my-company>"
Or checkout all files from the repository:
dot checkout .