Skip to content

Linux configuration files being versioning via git bare repository.

Notifications You must be signed in to change notification settings

beiertu-mms/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles logo

GitHub GitHub

My dotfiles setup using git bare repository functionality.

Prerequisites

  • git
  • rsync (to set up a new machine)

Set up from scratch

  1. Create a placeholder for git internal files
mkdir -p ~/dotfiles
  1. Initialize the bare repository
git init --bare ~/dotfiles
  1. Create an alias to interact with the dotfiles
alias dot='git --git-dir=~/dotfiles/ --work-tree=$HOME'

So now instead of git add or git status, use dot add, dot status etc.

  1. Configure git to ignore all files by default
dot config --local status.showUntrackedFiles no
  1. Now you are ready to track your dot files.

Note: To see which files are currently being tracked, use

dot ls-tree -r master --name-only

Install the dotfiles on a new machine

  1. Clone to a temporary folder
git clone --separate-git-dir=~/dotfiles <remote-git-url> tmp-dotfiles
  1. Synchronize the files
rsync --recursive --verbose --exclude '.git' tmp-dotfiles/ ~/
  1. Remove the temporary folder
rm -rf tmp-dotfiles

Credits

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

Linux configuration files being versioning via git bare repository.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages