Skip to content

Commit 71cd9a5

Browse files
authored
Merge pull request #44 from githubtraining/sane-configs
Sane Configs: add note about using --global only if its on own machine
2 parents 4900320 + 26b4c1c commit 71cd9a5

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

book/05_local_git_configs.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ These are the repository level configurations. They only apply to the specific r
3030

3131
> The default value for git config is `--local`.
3232
33+
3334
### Viewing Your Configurations
3435

3536
If you would like to see which config settings have been added automatically, you can type `git config --list`. This will automatically read from each of the three config files and list the setting they contain.
@@ -53,12 +54,21 @@ $ git config --global user.name "First Last"
5354
$ git config --global user.email "you@email.com"
5455
```
5556

56-
> Your name and email address will automatically be stored in the commits you make with Git. If you would like your email to remain private, GitHub allows you to generate a no-reply email address for your account. Click the **Keep my email address private** in the [Settings > Emails section](https://github.com/settings/emails). After enabling this feature, you just need to enter the automatically generated `ID+username@users.noreply.github.com` when configuring your email.
57+
#### Git Config and Your Privacy
58+
59+
The instructions for this exercise use the `--global` flag when identifying your `user.name` and `user.email` configuration settings. If you are currently using a computer without a private, personal account, don't apply the `--global` flag. This way, the settings will only be stored in our assignment repository. If you work in another repository on this same computer, you will need to set these configuration options again.
5760

5861
> For example:
59-
```sh
60-
git config --global user.email 18249274+githubteacher@users.noreply.github.com
61-
```
62+
> ```sh
63+
> git config user.email "you@email.com"
64+
>```
65+
66+
Your name and email address will automatically be stored in the commits you make with Git. If you would like your email to remain private, GitHub allows you to generate a no-reply email address for your account. Click the **Keep my email address private** in the [Settings > Emails section](https://github.com/settings/emails). After enabling this feature, you just need to enter the automatically generated `ID+username@users.noreply.github.com` when configuring your email.
67+
68+
> For example:
69+
> ```sh
70+
> git config --global user.email 18249274+githubteacher@users.noreply.github.com
71+
> ```
6272
6373
### Configuring autocrlf
6474

0 commit comments

Comments
 (0)