GithubHelp home page GithubHelp logo

gitgraph's Introduction

GitGraph

Knowledge Graph for Commit History of a Git repository.

The project is built with Maven. "Main" is the entry class.

Step 1: Open the java project ./GitGraph and then clone a Git project to analyse.

e.g. git clone https://github.com/rahulrj/YahooNewsOnboarding.git

Step 2: The command line parameters are -p, -f and -d.

-p <project_path> -f [<filtering_options>] -d [<database_output_path>]

p - -filter pictures

a - -filter audio

v - -filter videos

c - -customize

The above filtering content can be modified in \src\main\java\helper\TypeFilter.java.

e.g. java -jar gitgraph.jar -p ./YahooNewsOnboarding -f pavc -d D:/neo4j/data/databases/graph.db means that you want to filter pics, audio, videos and some customized filetypes.

Step 3: Download and install Neo4j https://neo4j.com/ . View the knowledge graph at http://localhost:7474

  • Remember to change the default settings of Initial Node Display to show more Nodes.

  • Use the Cypher statement "MATCH p=()-->() RETURN p" to show all the Nodes and Relationships.

  • You can change the color of Nodes and Relationships as you like with Neo4j.

  • If you wanna check a specific class like "MainActivity", use "MATCH (b:Class) WHERE b.name="MainActivity" RETURN b". You just need to double-click on the node to see other nodes and relationships associated with it.

More Cypher Statements cases:

  • MATCH (c:Commit)-->(f:File)-->(z:Class)-->(m:Method) WHERE c.type = "fixbug" AND m.create_commit = c.name RETURN m.name, m.class, count(m) AS cnt ORDER BY cnt DESC LIMIT 10

  • MATCH (c:Commit)-->(f:File) WHERE c.type = "fixbug" AND f.type = "java" AND f.create_commit = c.name RETURN f.name, c.developer

  • MATCH(c:Commit) WHERE c.type="fixbug" RETURN count(*)

  • Get more information at https://neo4j.com/developer/cypher-query-language/.

gitgraph's People

Contributors

xuanyi531 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.