From b937fa4794107a555b6ca97640aadc3950dae834 Mon Sep 17 00:00:00 2001 From: Greg Date: Mon, 21 Oct 2024 20:06:43 +0300 Subject: [PATCH] add readme --- .cfgstore/readme.txt | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .cfgstore/readme.txt diff --git a/.cfgstore/readme.txt b/.cfgstore/readme.txt new file mode 100644 index 0000000..46b146a --- /dev/null +++ b/.cfgstore/readme.txt @@ -0,0 +1,30 @@ +# Setup + +git init --bare $HOME/.cfgstore +alias cfg='/usr/bin/git --git-dir=$HOME/.cfgstore/ --work-tree=$HOME' +cfg config --local status.showUntrackedFiles no +funcsave cfg + + +# Use + +cfg add ~/.config/kitty +cfg commit -m "add kitty config" +cfg push + + +# Restore (on new machine) + +alias cfg='/usr/bin/git --git-dir=$HOME/.cfgstore/ --work-tree=$HOME' +funcsave cfg +git clone --bare git@github.com:fotonmoton/.dotfiles.git $HOME/.cfgstore +echo ".cfgstore" >> .gitignore +cfg config --local status.showUntrackedFiles no +cfg checkout + + +# Conflict resolution + +mkdir -p .config-backup && \ +config checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | \ +xargs -I{} mv {} .config-backup/{}