1
1
# Appendix
2
- ## Managing work vs personal personas
2
+ ## Managing work vs personal emails in git
3
3
In the world of open source, folks may have an online identity that pre-dates
4
4
their employment with our current organization. Simultaneously, the organization
5
5
may want contributions done on their behalf to happen with corporate emails.
6
6
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
8
17
configurations based on our directory structures.
9
18
10
19
Our ` ~/.gitconfig ` file might look like this:
@@ -18,7 +27,7 @@ Our `~/.gitconfig` file might look like this:
18
27
path = ~/my-company/.gitconfig
19
28
```
20
29
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
22
31
account). If we have repositories in the ` ~/my-company ` directory, we'll load an
23
32
additional git config file which is located at ` ~/my-company/.gitconfig ` . That
24
33
file might look like:
0 commit comments