On Sun, 31 Jan 2016 08:03:37 -0800 (PST)
mike r <mike.rei...@gmail.com> wrote:

[...]
> Im building some workflow to build a NGINX web server using Puppet,
> that uses a 'index.html' page located on a github .git repo
[...]
> My question is this, if someone updates the remote .git with a new 
> index.html version, is there any way for me to know that this change
> has happened on the remote?? Once the remote has been updated I will
> need to pull in those differences to my local repo. 
[...]

Let's put things simple: basically what you want is some sort of "push"
notification scheme rather than "pull"--that is, you want your part be
passive and the remote active and not vice-versa.

This is possible, in theory, via the so-called "hooks", which are
scripts (or standalone programs, FWIW) called by Git when particular
events happen in the repository it manages.  Read the "githooks" manual
page (run `git help hooks`) to get more info.

The problem is that hooks require explicit activation in the repository
they should run for, and since they may execute arbitrary code with the
credentials Git process which called them has, this is a great security
concern, and that's why Github obviously won't allow you to install
arbirtaty hooks into your repositories.

On the other hand, once you know what to look for ("hooks",
"notifications") trivial googling yields that Github appears to have a
proper solution for this through "Webhooks" [1].  I have zero
experience with this stuff but it appears you're able to register a
push-style notifier for your remote Github repo and create a local
webservice which will listen for those notifications and update your
local Git repo accordingly.

1. https://developer.github.com/v3/repos/hooks/

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to