cfgmagit

A while ago, I got the suggestion to set up

so I could use config to save dotfiles and such without every app believing that my entire home directory is a git repository.

I can clone the dotfiles from elsewhere with git clone ~/.cfg, but in the directory I instead call config, like config add, config

commit etc.

I’ve also seen other names proposed for this repo dir, like .myconf or .dotfiles.git.

But since apps don’t believe that my entire home directory is a git repository, that includes magit and I sometimes wanna use magit to restore files or partially stage hunks or whatever. Things that are too time-consuming to do by hand.

So here’s a script that temporarily actually does make the home directory into that git repository, waits for you to be done with Magit, and then restores things.

This does clobber the ~/.git file or even breaks if that pathname is a directory or such, so don’t have that.

Call it with your conf repo dir as an argument, in my case I’d call:

For a repo,

Proxied content from gemini://idiomdrottning.org/cfgmagit (external content)

Gemini request details:

Original URL
gemini://idiomdrottning.org/cfgmagit
Status code
Success
Meta
text/gemini; lang=en
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.