How to configure git send-email in local system

0 votes

Hi everyone,

I installed git in my windows system. I want to integrate email service with my git. Whenever I commit something, it will send an email to me. How can I implement this task using send-email?

May 4, 2020 in Git & GitHub by akhtar
• 38,260 points
2,409 views

1 answer to this question.

0 votes

Hi@akhtar,

To use git send-email service you have to set some global variable in your .gitconfig file. You can run these commands as given below from your git bash.

git config --global sendemail.smtpencryption tls
git config --global sendemail.smtpserver mail.messagingengine.com
git config --global sendemail.smtpuser "replace with user"
git config --global sendemail.smtpserverport 587
git config --global sendemail.smtppass "Replace with password"
git config --global sendemail.to "destination_user"

After setting this in your .gitconfig file, you can create one hook as post-commit and inside this hook write the below lines as given below.

#!/bin/bash
git send-email -1

Now whenever you commit something it will send one mail to your destination address.

answered May 4, 2020 by MD
• 95,460 points

Related Questions In Git & GitHub

0 votes
1 answer

How to install Git in the Ubuntu system?

Hi@akhtar, In the Ubuntu system, you can use ...READ MORE

answered Nov 19, 2020 in Git & GitHub by MD
• 95,460 points
687 views
0 votes
1 answer

How to undo the most recent local commits in Git?

Hi@akhtar, There is one way available to undo ...READ MORE

answered Dec 21, 2020 in Git & GitHub by MD
• 95,460 points
636 views
0 votes
1 answer

How to do a re-merge into another branch in git

Seems like you want to rebase your ...READ MORE

answered May 7, 2018 in Git & GitHub by DareDev
• 6,890 points
2,473 views
0 votes
2 answers

How to view the nested workflow of a local git repository?

The closest way to view branches in ...READ MORE

answered Aug 2, 2019 in Git & GitHub by Sirajul
• 59,230 points
1,626 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,064 views
+2 votes
1 answer
0 votes
1 answer

How to share images in GitHub from local system?

Hi@akhtar, You can follow the below steps to ...READ MORE

answered May 7, 2020 in Git & GitHub by MD
• 95,460 points
1,406 views
0 votes
1 answer

How to create branch in GitHub from my local Git repo?

Hi@akhtar, To sync your existing branch in GitHub, ...READ MORE

answered May 7, 2020 in Git & GitHub by MD
• 95,460 points
927 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP