How i alias git to manage my home directory (for dotfiles)

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 also used to achieve identity between branches and then have the branches have some common root, but not doing that anymore.

# Benefits

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)

Previously

I used to instead try staging the file .gd/info/exclude (counterpartly, .git/info/exclude)

https://github.com/mkf/homedirconfig/commit/7a6f15ebeeda04a3258dc70ab2f5e2e9d72f2854

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.

https://wiki1.mikf.pl/git/excludefiles.html

Post scriptum

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)

https://log1.mikf.pl/today_i_asked_superuser_gitignore/

I guess I just didn't host it on Github back then, but on a regular ssh *nix.

This post was prompted by

reading @aelspire's

2022-07-28 – The slacker’s guide to managing dotfiles