This repository contains my personal dotfiles. These dotfiles are managed using a bare Git repository.
To install the dotfiles, follow these steps:
-
Clone this repository to your local machine:
git clone --bare https://github.com/ViniciusNyp/dotfiles $HOME/.dotfiles
-
Define an alias for the dotfiles repository:
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
-
Configure the dotfiles repository to not show untracked files:
dotfiles config --local status.showUntrackedFiles no
-
Checkout the dotfiles:
dotfiles checkout
If you encounter any errors, make sure your home directory is clean and try again.
-
Set up the dotfiles repository to track the remote branch:
dotfiles branch --set-upstream-to=origin/main main
-
Pull the latest changes:
dotfiles pull
To manage your dotfiles, use the dotfiles
alias defined above. Here are some common commands:
-
Add a new dotfile:
dotfiles add <file>
-
Add all already tracked dotfiles:
dotfiles add -u
-
Commit changes:
dotfiles commit -m "Commit message"
-
Push changes to the remote repository:
dotfiles push
-
Pull changes from the remote repository:
dotfiles pull