Skip to content

Instantly share code, notes, and snippets.

@jamieoliver
Created September 4, 2024 19:05
Show Gist options
  • Save jamieoliver/459cef37ca9f9ae38bf395b800cb67ff to your computer and use it in GitHub Desktop.
Save jamieoliver/459cef37ca9f9ae38bf395b800cb67ff to your computer and use it in GitHub Desktop.
Conditionally set Git user.name and user.email based on remote URL otherwise require them to be set locally
[includeIf "hasconfig:remote.*.url:https://github.com/**"]
path = .gitconfig-github
[includeIf "hasconfig:remote.*.url:https://huggingface.co/**"]
path = .gitconfig-huggingface
[user]
useconfigonly = true
[user]
name = <name>
email = <username>@users.noreply.github.com
[user]
name = <name>
email = <username>@users.noreply.huggingface.co
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment