5 ms·
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
by mubou 1y 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 1y agoYes, I assume different emails/names and ssh keys. Of course, I can do manual configuration, but I think it is a bit "tiresome".
- mubou 1y agoCan 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 https://alysivji.github.io/multiple-gitconfig-files.html
- vseplet 1y agoYes, 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)