Almost nobody wants to set user.name/user.email on a per-repository
basis as the previous example suggested. I put in a new example that
shows how to use C<git config --global> along with an example of how
to set user.email just for F<perl-git>
I replaced Leon Brocard's name with mine because he didn't fit into
the multiple E-Mail address example and I couldn't think of another
example.
% git config remote.origin.url ssh://perl5.git.perl.org/perl.git
% git config remote.origin.url ssh://perl5.git.perl.org/perl.git
-You can also set up your user name and e-mail address. For example
+You can also set up your user name and e-mail address. Most people do
+this once globally in their F<~/.gitconfig> by doing something like:
- % git config user.name "Leon Brocard"
- % git config user.email acme@astray.com
+ % git config --global user.name "Ævar Arnfjörð Bjarmason"
+ % git config --global user.email avarab@gmail.com
+
+However if you'd like to override that just for perl then execute then
+execute something like the following in F<perl-git>:
+
+ % git config user.email avar@cpan.org
It is also possible to keep C<origin> as a git remote, and add a new
remote for ssh access:
It is also possible to keep C<origin> as a git remote, and add a new
remote for ssh access: