Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We got some code in a git repository that's used along different projects (with git different repositories), the problem is that we got now so many different projects that's difficult to track which projects will be affected and how when there is a change in the shared module.

Is there any way to find classes and methods usages along different git repositories? Or who would you manage an architecture like that?

share|improve this question
I don't have an answer, however a good start is to understand that GIT is a Revision Control system, not a Configuration Management system. – mattnz May 22 '13 at 1:04

Take a look at some code quality and code indexing tools.


For starters, you could use FishEye, which would index your code and allow you to quickly query for code from all the repositories so you can keep a bird's eye view of the whole codebase.

For instance, you could search for a given file (but also for a file's content, including a method name) and it will find affiliated tickets and changesets that modified it, and its latest version in your code repositories:

FishEye file search

However, FishEye doesn't necessarily understand the code and see methods as units to be tracked, so you can't say "find call points of method M of class C".


A code quality tool like Sonar would also allow you to keep an eye on dependencies (especially if you have a maven-based build).

For instance, a very handy view is this one:

Sonar Design View

It allows you to see the connections between different components in terms of dependencies, so you know that a change to this component might impact the other ones.

Read here for more.

Again, it doesn't really tell you that at the method level though (it relies on the dependency graph of the binary dependencies of your build).

Update: Actually, looks like Sonar even does method level tracking (see the SonarSource blog I linked above):

Sonar Design View with Method Tracking


Available online for open-source project repositories, you can also deploy your own instance (basic version for free).


Host your own CodeSight instance.

Elastic Search

GitHub uses it since January 2013, so if your git repo is GitHub-hosted you can already benefit from that. Otherwise you can roll out your own.

Roll Out Your Own

Probably not adviseable, but you could probably produce an indexed database of your code using a nightly job parsing your projects and using a full-text search engine (like Apache Lucene, for instance), or even something more low-tech than that.

You can find more tooling support for code analysis and graphing at the class level, but you'd end up with pretty complicated and unreadable graphs very quickly anyways, for any relatively large system.

Many build systems have plugins for that sort of thing.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.