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 in Git & GitHub by akhtar
• 25,030 points
117 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 by MD
• 56,480 points

Related Questions In Git & GitHub

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,850 points
586 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
• 57,940 points
222 views
0 votes
1 answer

How to give a file execute mode permissions in Git?

You can easily do this in one ...READ MORE

answered Aug 6, 2018 in Git & GitHub by Sophie may
• 10,100 points
4,639 views
0 votes
1 answer

How to add a remote git repository in Jenkins

Follow these steps: Step 1 Go to Manage ...READ MORE

answered May 23, 2019 in Git & GitHub by Alok
350 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
680 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 in Git & GitHub by MD
• 56,480 points
70 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 in Git & GitHub by MD
• 56,480 points
76 views