Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:07:26+00:00 2026-06-09T19:07:26+00:00

I have a script which emails me a reminder if I’ve forgotten to commit

  • 0

I have a script which emails me a reminder if I’ve forgotten to commit or push some code on each of my 40+ repositories.

With 2 of my projects, I have followed the answers in these posts, where I have set-up “git-push” to push to multiple repositories:

pull/push from multiple remote locations

git push to multiple repositories simultaneously

So I have a .git/config file with:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "origin"]
    url = https://www.example.com/git/project/
    url = git@github.com:username/project.git
[remote "example"]
    url = https://www.example.com/git/project/
    fetch = +refs/heads/*:refs/remotes/example/*
[remote "github"]
    url = git@github.com:username/project.git
    fetch = +refs/heads/*:refs/remotes/github/*

This works well when it comes to doing a git push/pull.

With the script I have used:

git status --short

But this only shows un-commited changes… even without the “–short” flag, it does not show what normally appears with only 1 remote:

Your branch is ahead of 'origin/master' by 1 commit.

Trying to run any of the following “diff” commands also doesn’t seem to work… well it does on the first time, but it seems to remember the remote files at the date/time when it was setup, so as you make more changes it compares them against that version in history:

git diff --name-status "origin";
git diff --name-status "origin/master";
git diff --name-status "example/master";
git diff --name-status "github/master";

Any thoughts? I am fairly new to Git.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T19:07:27+00:00Added an answer on June 9, 2026 at 7:07 pm

    I believe this method is possibly a bit buggy, as it seems to remember a commit ref for each remote, but this does not get updated when doing a push/pull… so when checking via a diff, its always going to look at the old commit ref for a comparison.

    While its not a solution to this setup, I have gone back to a single remote setup, but edited it so that it has 2 urls… so while the pull only happens from one remote, when I push, it goes to two:

    [core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
    [branch "master"]
        remote = origin
        merge = refs/heads/master
    [remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = https://www.example.com/git/project/
        url = git@github.com:username/project.git
    

    Note: This only works for now, as I’m the only committer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Essentially I have a script which acts as a task wrapper and emails a
i have a script which is for virtual keyboard, i am facing some problem
I have a script which validates each stage of a form and adds a
I'm using the zend framework and have a script which sends emails. However my
I have a php script which is responsible for sending emails based on a
So I have a PHP script which takes in piped emails, appends a footer
I have a PHP script which emails someone 2 images when they have completed
I have following script which processes emails and save them to csv file. there
I have a PHP script through which I send HTML emails. I'm using a
I have script which allows to display Bing search results. I can call for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.