Multiple --global config workspaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx"

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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux