Instructions fo the dotfiles repository at https://gitlab.com/niharokz/dotfile.
The dotfiles in this repository are installed using a bare Git repository. This method does not use symlinks (like most other dotfile repositories).
After the installation, all the dotfiles will be physically present in your home folder, yet, you will still have them under full version control.
Now all the dotfiles from the repository are installed in your home directory.
However, as mentioned, you still have them under full version control via the bare Git repository in ~/.dotfiles
.
To interact with the bare Git repository, you need the following alias:
dot='/usr/bin/git --git-dir=$HOME/.config/.dotfile --work-tree=$HOME'
Note: the .alias
file in the dotfiles repository already contains this alias, so you're good to go.
With the dot
alias, you can now manage the dotfiles via the bare Git repository, just as you would with the git
command:
Edited your dotfiles? No problem, commit and push the changes:
dot add ~/.vimrc
dot commit -m "Edit .vimrc"
dot push
Pushed changes to the remote repository from another machine? Easy, just pull down the new version:
dot pull
Want to know what's going on?
dot status
Don't want to see untracked files:
dot config status.showUntrackedFiles no
While installing dot files in a new system:
git clone --bare git@gitlab.com:niharokz/dotfile.git $HOME/.config/.dotfile
dot='/usr/bin/git --git-dir=$HOME/.config/.dotfile --work-tree=$HOME'
dot checkout
Using a bare Git repository is described here: