-
Install GitPython: The script requires the
gitpython
package, which also includesgitdb
andsmmap
as dependencies. You can installGitPython
using pip:pip3 install gitpython
-
Download the Python script: To download the 'tool.py' script, please follow these steps:
- download 'tool.py' file on GitHub at this URL: https://github.com/GaspardIV/gitvision/blob/main/tool/tool.py
You can also clone the whole repository.
-
Clone the Git repository: Clone the repository you want to analyze. For instance:
git clone REPOSITORY_URL
This command will clone the repository into a folder named after the repository in your current directory.
-
Generate data: To generate data from the cloned Git repository, run the Python script and provide the path to the repository as a command-line argument:
python3 tool.py <path_to_your_git_repository>
After running the script, a
.json.gz
file will be created in the same directory. -
Use the data:
-
For
gitvis.web.app
: Go to gitvis.web.app and upload the.json.gz
file at the bottom of the website. -
For building from sources
gitvisionwebapp
: First, you need to clone and buildgitvisionwebapp
from its sources. Once done, rename the generated.json.gz
file toown.json.gz
and paste it intogitvisionwebapp/public/repos
. Then, go tolocalhost:<your_port>/own
in your web browser. Alternatively you can go tolocalhost:port
and upload the.json.gz
file at the bottom of the website.
-
Caution: In some cases, it may be necessary to switch to WSL (Windows Subsystem for Linux) when using GitVision tool on Windows.