Comment

Comment by guthriej

Thank you for this! I have exactly the same problem and was waiting for the solution to present itself, which it now has.

Aside: I use NixOS with home-manager (on linux and mac), which makes this trivial [1]. Added the following lines to my home-manager config:

  programs.git = {
    enable = true;
    ...
    includes = [
      {
        condition = "hasconfig:remote.*.url:[email protected]:<work>/**";
        contents = {
          user.email = "<work email>";
        };
      }
    ];
  }

[1]: https://nix-community.github.io/home-manager/options.xhtml#o...
parent guthriej 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton