Skip to content

Since I wanna be cool and use Nix everywhere, I kinda need a repo to access it easily

Notifications You must be signed in to change notification settings

untio11/.dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfile Backup

Source for more elaboration on the steps.
NOTE: In my setup, I renamed /.cfg to /.dotfiles and the config alias to dotfile.

Creating a repo to manage dotfiles in user home directory:

git init --bare $HOME/.dotfiles
alias dotfile='git --work-tree=$HOME --git-dir=$HOME/.dotfiles'
dotfile config --local status.showUntrackedFiles no

# Consider adding the alias to your shell config:
echo "alias dotfile='git --work-tree=$HOME' --git-dir=$HOME/.dotfiles" >> $HOME/.bashrc

After this setup, dotfiles should be managed like one normally would, but using dotfile instead of git:

dotfile status
dotfile add .vimrc
dotfile commit -m "Add vimrc"
dotfile add .bashrc
dotfile commit -m "Add bashrc"
dotfile push

Restoring from repo to new machine:

The commands below overwrite any existing files with the same name, so be cautious!

cd ~
git clone --bare https://github.com/untio11/.dotfiles.git $HOME/.dotfiles
alias dotfile='git --work-tree=$HOME --git-dir=$HOME/.dotfiles'
dotfile config --local status.showUntrackedFiles no

# Careful!
dotfile checkout --force

About

Since I wanna be cool and use Nix everywhere, I kinda need a repo to access it easily

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published