Difference between revisions of "Development using git:Email"

From Alpine Linux
Jump to: navigation, search
m (Email configuration: - add example)
m (Email configuration)
 
Line 15: Line 15:
 
To reset CC mail attribute
 
To reset CC mail attribute
 
{{Cmd|git config --global sendemail.suppresscc all}}
 
{{Cmd|git config --global sendemail.suppresscc all}}
 +
  
 
'''Example ~/.gitconfig'''
 
'''Example ~/.gitconfig'''

Latest revision as of 22:50, 27 November 2015

Email configuration

To be able send your commits (patches) via email you need configure an SMTP server.

git config --global sendemail.smtpserver smtp.exmaple.com

For sending from a gmail address you can do:

git config --global sendemail.smtpserver smtp.gmail.com git config --global sendemail.smtpserverport 587 git config --global sendemail.smtpencryption tls git config --global sendemail.smtpuser your_email@gmail.com

Optionally, it is possible to skip the password prompt by adding it to the configuration with:

git config --global sendemail.smtppass your_password

To reset CC mail attribute

git config --global sendemail.suppresscc all


Example ~/.gitconfig

[user]
        email = user@gmail.com
        name = Your Name
[core]
        editor = nano
        pager = less -FXRS
[sendemail]
        from = Your Name <user@gmail.com>
        smtpuser = user@gmail.com
	smtpserver = smtp.googlemail.com
	smtpencryption = tls
	smtpserverport = 587
	suppresscc = self

[push]
        default = simple