diff options
| author | tekkub <tekkub@gmail.com> | 2009-06-20 20:23:06 -0600 |
|---|---|---|
| committer | tekkub <tekkub@gmail.com> | 2009-06-20 20:23:06 -0600 |
| commit | e0b2eef46bffd1e655cdf818bc1f767d04915092 (patch) | |
| tree | 9279bf5cac2c3e9a97813a4317708f3fed107040 /_posts/2009-06-20-git-email-settings.textile | |
| parent | e334d158b928300631e02b729c70f83e7aba530f (diff) | |
Git settings guide
Diffstat (limited to '_posts/2009-06-20-git-email-settings.textile')
| -rw-r--r-- | _posts/2009-06-20-git-email-settings.textile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/_posts/2009-06-20-git-email-settings.textile b/_posts/2009-06-20-git-email-settings.textile new file mode 100644 index 0000000..2b4ecf4 --- /dev/null +++ b/_posts/2009-06-20-git-email-settings.textile @@ -0,0 +1,35 @@ +--- +layout: guide +title: Setting user name, email and token +subtitle: This guide covers basic git settings you should set before making any commits +description: Configure your local git installation so that commits are linked to your GitHub account +categories: setup +--- + +h3. Setting user name and email globally in git + +Git needs to know your username and email address to properly credit your commits. Setting this setting will also let GitHub link the commits you make to your GitHub account. + +p(. _The "email" setting does not have to be a valid email address, it only need match the "user@server" naming scheme._ + +<pre>$ git config --global user.name "Tekkub" +$ git config --global user.email "tekkub@gmail.com"</pre> + +h3. Overriding settings for individual repos + +If you do not want commits to be "blamed" on your global email setting, you can override these settings on a per-repo basis. + +p(. _This change will only affect future commits. Existing commits will retain the info they were committed with._ + +<pre>$ cd my_other_repo +$ git config user.name "Not Tekkub" +$ git config user.email "not@tekkub.net"</pre> + +h3. GitHub token config + +Some tools connect to GitHub without SSH, for these tools you need to set your "local GitHub config":http://github.com/blog/180-local-github-config. You can find your token at the top of the "account page":https://github.com/account + +<pre>$ git config --global github.user tekkub +$ git config --global github.token 0123456789abcdef0123456789abcdef</pre> + +If you change your GitHub password a new token will be created, therefore you'll need to change this setting.
\ No newline at end of file |
