Skip to content

Commit 6dd144d

Browse files
committed
document the single-repo case and why that might not scale well.
1 parent cf2373b commit 6dd144d

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

content/05-appendix.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
# Appendix
2-
## Managing work vs personal personas
2+
## Managing work vs personal emails in git
33
In the world of open source, folks may have an online identity that pre-dates
44
their employment with our current organization. Simultaneously, the organization
55
may want contributions done on their behalf to happen with corporate emails.
66

7-
To manage this, we can use a feature of git which allows different
7+
One way that folks can solve this is by encoding their commit email on a
8+
per-repository basis, like:
9+
10+
```
11+
git config user.email "[email protected]"
12+
```
13+
14+
15+
If you work with several repositories, this will become difficult to manage and
16+
easy to forget. Instead, we can use a feature of git which allows different
817
configurations based on our directory structures.
918

1019
Our `~/.gitconfig` file might look like this:
@@ -18,7 +27,7 @@ Our `~/.gitconfig` file might look like this:
1827
path = ~/my-company/.gitconfig
1928
```
2029

21-
This sets our default persona (which, in this case, is for a personal
30+
This sets our default email (which, in this case, is for a personal
2231
account). If we have repositories in the `~/my-company` directory, we'll load an
2332
additional git config file which is located at `~/my-company/.gitconfig`. That
2433
file might look like:

0 commit comments

Comments
 (0)