From 38c1ebc6a1337cf6d3df52070097a342f8e5e0f1 Mon Sep 17 00:00:00 2001 From: Justine Smithies Date: Wed, 6 Nov 2024 18:30:15 +0000 Subject: Reinstalled md files as changes from Linux to FreeBSD gave issues --- posts/dotfiles.md | 142 ++++++++++-------------------------------------------- 1 file changed, 25 insertions(+), 117 deletions(-) (limited to 'posts/dotfiles.md') diff --git a/posts/dotfiles.md b/posts/dotfiles.md index b6c9fd0..f339f2b 100644 --- a/posts/dotfiles.md +++ b/posts/dotfiles.md @@ -1,118 +1,26 @@ - - - - - - Justine Smithies blog - No Title - - - - - -
- -
-
+# How I store my dotfiles. -
- - - +I use a bare repository to sync my dotfiles and set it up as follows: + +``` +git init --bare $HOME/.cfg +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no + +# The add and commit below are just an example of adding a file to the repo +config add .config/nvim/init.lua +config commit -m "Added init.lua" + +git remote add origin REMOTE_URL +git push origin master +``` + +To install them from mine or someone else's git repo do the following: + +``` +echo ".cfg" >> .gitignore +git clone --bare REMOTE-GIT-REPO-URL $HOME/.cfg +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no +config checkout +``` -- cgit v1.2.3