7 | | == Initial setup == #Initialsetup |
8 | | Git commits contain your name and email address. You should set them in your git configuration using the following commands: |
9 | | {{{ |
10 | | git config --global user.name "Your Name" |
11 | | git config --global user.email YOUR_MACPORTS_HANDLE@macports.org |
12 | | }}} |
13 | | If you work on multiple Git projects and do not want to modify your email address for those, these commands can also be run without `--global` in a clone of MacPorts' repositories to only change the option for these repositories. If you are not a MacPorts committer, use any email address. |
14 | | |
15 | | |
16 | | |
| 7 | |
| 8 | == Basic setup == #setup |
| 9 | |
| 10 | Git commits identify authors and committers by name and email address. You will likely use the same name for all your Git projects, so you can set it in your `$HOME/.gitconfig` file with: |
| 11 | {{{ |
| 12 | $ git config --global user.name 'Foo Barbaz' |
| 13 | }}} |
| 14 | |
| 15 | On the other hand, you may want to reserve your MacPorts email address for MacPorts use. After cloning one of our repositories, you can set your email in `/path/to/MacPorts/repo/.git/config` with: |
| 16 | {{{ |
| 17 | $ cd /path/to/MacPorts/repo |
| 18 | $ git config user.email foobarbaz@macports.org |
| 19 | }}} |
| 20 | |
| 21 | If you are not a MacPorts committer, feel free to use any email address. |