Take the 2-minute tour ×

What is the correct method to monitor changes made to a library on Github?

I have a project that uses multiple libraries on Github and would like to know how to monitor these for updates. If I mark the project as Watching I think I receive all emails of issues etc too, I am just looking for notification in changes.

At the moment they are downloaded projects/libraries in zip form from Github and attached to my project manually.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I always add libraries hosted with git as submmodules. Then if it's on github I go ahead star & watch it. I have the RSS feed on my phone and on my desktop so I see when someone pushes a commits to any of those libraries. After that its as simple as going into submodules and git fetch&git merge. If I want to update them all I just git submodule foreach git pull


Direct quote from documentation:

Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.

Submodules are definately the way to go in using git hosted libraries in your projects.

To add a submodule: git submodule add <repository> [<path>] path is optional and if not defined name of the repository will be used.

When you add a submodule if you check git status you will see something like this.

$ git status
# On branch master
# Changes to be committed:
#      new file:   .gitmodules
#      new file:   submodule

As you noticed the whole folder is tracked as a file and there is a file called .gitmodules added. .gitmodules file is a configuration file that stores the mapping between the remote repository and the local subdirectory you pulled it in. The submodule itself you see in git. If you run a git diff --cached on the submodule file itself you will see its just the commit SHA of the latest commit on the submodule repository.

Submodules in git are actual repositories so you can go in them and do anything you can do with a normal repository. Git doesn't actually track the contents of submodules it records it as a particular commit from the submodule itself. So you can use a specific commit on a submodule if you want.

A great resource explaining submodules is the git book.

share|improve this answer
Do you have any other information on submodules? What they are and how you use them? –  StuartM Feb 28 '13 at 17:52
Here added some info on submodules ^^ –  Learath2 Feb 28 '13 at 18:17

Your Answer


