News for hackers. Stuff that matters.
Re:Use multiple Git SSH identities on a single computer by mr-karan on Thursday July 20, 2023 @12:40PM (#36803115)
I use the following aliases in my ~/.zshrc file:

  alias workgit="git config user.name 'full name' && git config user.email '[email protected]'"
  alias persgit="git config user.name 'full name' && git config user.email '[email protected]'"

I prefer this because there are some overlapping directories in my filesystem and don't want to automatically use another git identity just based on file paths. Works well enough for my usecase.

There are no comments on this comment yet.