How to 'Watch' only a directory in a GitHub repository?

For example, https://github.com/vanillaforums/Garden is the GitHub repository. But I only want to 'watch' this directory https://github.com/vanillaforums/Garden/tree/master/plugins in the repository.

How do I do that? There doesn't seem to be a way.


Solution 1:

GitHub provides feeds that can do this for both directories and files. Using that syndication, a service like Blog Trottr can send you an email whenever the feed is updated.

Some samples, taken from the Linux source code on master:

  • A directory: source on GitHub, history on GitHub, Atom feed.

  • A file: source on GitHub, history on GitHub, Atom feed.

Solution 2:

I can't think of anything if you really need to watch a directory. But if you can get away with a single file, you can use a change tracker like VisualPing1 on the raw view of the file in question. The directory view would probably change every time someone starred or watched the project, but a single file should be sufficient for a lot of people (especially with Makefile.am / CMakeLists.txt / etc. which list all subdirectories).

1 No particular endorsement. They bought the service I was using before.

Solution 3:

I confirm that the "watch" feature on GitHub is at the repository level, not at the directory level.

For directory-level watching, you could implement it by, for instance, having a local process cloning, then pulling, that repo every x hours, checking the ls-tree of each new commit, and then sending you an email if an update in plugins is detected.

Solution 4:

I just found out this service: https://app.github-file-watcher.com/

Watching a repository on GitHub tells you about social activity (e.g. PRs, issues, etc.), but it doesn't let you know about file-level changes you might care about (e.g. changes to an internal API you're abusing, to a SQL structure, to a dependencies file).

GitHub File Watcher fills that gap. Just enter your email, the GitHub repository you want to track, and what files you want notifications for. When they change, you get an email.

I don't know yet if it works, will start using now.

Solution 5:

You could follow the commit page with some website that tracks changes on sites. For example I'm using Follow That Page for the history of a file on ActiveAdmin's github.