git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Multiple --global config workspaces?
@ 2022-10-11  3:06 Elsie Hupp
  2022-10-11  5:50 ` Junio C Hamano
  2022-10-11  5:51 ` Reto
  0 siblings, 2 replies; 14+ messages in thread
From: Elsie Hupp @ 2022-10-11  3:06 UTC (permalink / raw)
  To: git

Hi Git Mailing List,

The way I personally use Git has a slight inconvenience: as far as I can tell, there is no way to define multiple git config --global workspaces in a single Unix account. 

I structure my cloned repositories based on the remote host, e.g.:

~/Repositories/github/cloned-repository-name
~/Repositories/gitlab/other-cloned-repository-name

…and I sign my git commits for each remote host using an email address and signing key specific to that host.

I imagine many people have similar arrangements for the purpose of separating, say, work projects from personal projects.

Before I started using this workspace arrangement, I was able to do the following:

$ git config --global user.name "Elsie Hupp"
$ git config --global user.email "elsiehupp@example.com"

However, now that I use different signing identities for different remote hosts, I have to set up my Git identity every single time I clone a repository, and this repetitiveness is the slight inconvenience I refer to above.

What might possibly help in this situation could be if I could have the global ~/.gitconfig somehow delegate to separate .gitconfig files in each of the workspace folders I have set up, e.g.:

~/Repositories/github/.gitconfig
~/Repositories/gitlab/.gitconfig

…and then have git config --global in, e.g., ~/Repositories/github/cloned-repository-name apply to all cloned repositories in ~/Repositories/github but not to cloned repositories in ~/Repositories/gitlab.

(Obviously there are other ways this could be implemented, but this is the one that immediately came to mind.)

How feasible would it be to implement multiple --global config workspaces with functionality along these lines? And what other considerations and issues might there be with doing so?

Anyway, thank you for your time and attention.

Sincerely,
Elsie Hupp

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-10-20  2:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-11  3:06 Multiple --global config workspaces? Elsie Hupp
2022-10-11  5:50 ` Junio C Hamano
2022-10-11 13:13   ` Jeff King
2022-10-11 16:55     ` Elsie Hupp
2022-10-11 18:41       ` Elsie Hupp
2022-10-14 19:39       ` Jeff King
2022-10-15 10:56         ` Matthias Aßhauer
2022-10-15 18:14           ` Jeff King
2022-10-18  4:02         ` Elsie Hupp
2022-10-18 20:53           ` Jeff King
2022-10-20  2:29             ` Elsie Hupp
2022-10-20  2:39               ` Elsie Hupp
2022-10-11 13:56   ` Philip Oakley
2022-10-11  5:51 ` Reto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).