Skip to content

Commit

Permalink
Update gitconfig examples with information on how to different work/p…
Browse files Browse the repository at this point in the history
…ersonal config
  • Loading branch information
Stratus3D committed Aug 5, 2022
1 parent ea064e7 commit 7fc58d9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions git/configs/companyname.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file is for customizing the .gitconfig for a specific set of repos (e.g.
# work, personal, etc...) To use this file remove the .example suffix and give
# it a meaningful name. See mixins/gitconfig.custom.example for more details.

[github]
user = <username>
[user]
email = <email>
16 changes: 12 additions & 4 deletions mixins/gitconfig.custom.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# This file is for customizing the .gitconfig To use this file remove the
# .example suffix. The contents of the file will be concatenated with the
# .gitconfig. Set all custom git config values here.
[github]
user = <username>
[user]
email = <email>
#
# Typically I conditionally include Git config based on the URL in the origin
# remote as described here:
# https://lobste.rs/s/7xgrw9/git_with_multiple_e_mail_addresses#c_kwkefm
#
# See the example file at git/configs/companyname.example for an example of
# what one of these included files should look like.

[includeIf "hasconfig:remote.*.url:[email protected]:Stratus3D/**"]
path = ~/dotfiles/git/configs/personal-github
[includeIf "hasconfig:remote.*.url:[email protected]:companyname/**"]
path = ~/dotfiles/git/configs/companyname

0 comments on commit 7fc58d9

Please sign in to comment.