mubou 18 hours ago

Are you talking about your git name and email? Because you can set that (and other settings) per-repo simply by omitting --global in `git config`.

If you have multiple github accounts, you can use separate keys by defining custom hosts in your ssh config, but that doesn't seem relevant in your case.

  • vseplet 18 hours ago

    Yes, I assume different emails/names and ssh keys. Of course, I can do manual configuration, but I think it is a bit "tiresome".

    • mubou 17 hours ago

      Can I ask what you find tiresome, specifically? If it's because you have tons of repos, there's a little-known git feature where you can set the config for all repos in a directory, so that e.g. ~/work/* uses your work name & email, without having to `git config` every new repo you create or clone. https://alysivji.github.io/multiple-gitconfig-files.html

      • vseplet 16 hours ago

        Yes, I understand the capabilities of git... But, it still seems too tedious to me. In general, I have already solved this problem for myself quite a long time ago by making a small utility that, when cloning a repository (no matter where and no matter where), offers to choose one of the available git profiles (and keys). In this way, I can easily work with each repository separately, have several profiles for github, gitlab, and so on.

        But I was wondering if anyone has solved a similar problem or uses some ready-made tool)