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
• 11,270 points
25 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
• 24,500 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
433 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
• 53,110 points
158 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
• 9,940 points
2,884 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
192 views
+13 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,420 points
498 views
0 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
• 24,500 points
20 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
• 24,500 points
39 views