-- Leo's gemini proxy
-- Connecting to g.mikf.pl:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
I am writing this on the first Saturday of September 2022 but the solution described is in use since exactly two years ago already.
I have a repository, hosted on GitHub, it's public and it's mkf/homedirconfig.
They way I set it up:
i clone my previous homedirconfig repository in a regular way, in some directory where i would store code repositories
i paste my alias into the rc of my shell of choice, in this case tcsh, so .tcshrc:
alias gd env GIT_WORK_TREE="$HOME" \ GIT_DIR="$HOME/.gd" \ GIT_CONFIG="$HOME/.gdconfig" \ git -c "core.excludesfile=$HOME/.gdignore"
i create a newly-named branch with gd, after initing the repo
i copy things from other machines' branches for first versions
i cherry-pick any further (or initializing) changes
I also used to achieve identity between branches and then have the branches have some common root, but not doing that anymore.
i use gd as i would use git, but it acts on my home directory.
when im not in a git repository, nothing acts on my home directory repository because its files are under different names
i don't have a collision between .gitconfig of the home repo and the ~/.gitconfig global, which is important
i don't have the homedir-repo ~/.gitignore potentially act globally
the .git directory is instead named .gd
the repository's .gitconfig is instead stored as .gdconfig
instead of .gitignore i have .gdignore (funny TIL Godot the game engine has its ignore file named the same haha)
I used to instead try staging the file .gd/info/exclude (counterpartly, .git/info/exclude)
That wasn't too neat to manage.
It's benefit: it could both be managed by git in a non-aliased repo, as well as being immediately present there and not needing a core.excludesfile setting.
Whoosh, I just reminded myself of my old blog, and there is a mention of this repo from January 2020. So that's over 2.5y ago.
"Today I asked on Super User: Are .gitignore files from directories above the repository's or from home directory loaded in any versions of Git?" (250 words)
I guess I just didn't host it on Github back then, but on a regular ssh *nix.
reading @aelspire's
-- Response ended
-- Page fetched on Tue May 21 23:24:50 2024