Gitlog is a command-line tool that generates Git log reports across multiple repositories. Designed to simplify your workflow, gitlog automatically collects commit data for a specific author over a defined time period.
- Collects Git logs across multiple repositories.
- Filters commits by author and time range.
- Outputs logs to organized text files.
- Includes autocompletion for command-line options.
You can install gitlog by either running the installation script or by downloading the .deb package.
Download the latest .deb package from the releases page of this repository and install it using:
sudo dpkg -i gitlog*.debClone the repository and run the provided installation script:
git clone https://github.com/caesar003/gitlog.git
cd gitlog
chmod +x install.sh
sudo ./install.sh- Git
- Bash
- Root privileges (for installation)
The main configuration file is located at ~/.config/gitlog/setting.conf. Here you can set default parameters such as the repository, author, and starting date:
# ~/.config/gitlog/setting.conf
repository=sample
author=superadmin
since=2022-10-01
Each repository you want to include in the logs should be listed in JSON files within ~/.config/gitlog/repositories/. Each JSON file should contain the list of repository paths:
Run gitlog with various options to generate logs or view help information.
gitlog [OPTIONS]-h, --help: Display help message.-v, --version: Show the version number ofgitlog.-g, --generate: Generate Git logs based on the provided configuration.-a, --author: Specify the author name.-s, --since: Set the start date inYYYY-MM-DDformat.-n, --name: Define the repository configuration file to use.
Generate a report for superadmin from 2022-10-01 using the default repository list:
gitlog --generate --author "superadmin" --since "2022-10-01"Specify a custom repository configuration:
gitlog --generate --name "sample"Display help information:
gitlog --helpbin/: Contains the maingitlogexecutable.config/: Default configuration files.repositories/: JSON files listing repositories.
share/: Man page and completion script.bash-completion/: Bash completion script forgitlog.man/: Man page file forgitlog.
- python3
- git
Clone the repository
git clone https://github.com/caesar003/gitlog.gitcopy configuration file into C:\Users\<user>\AppData\Roaming\gitlog\setting.conf with the following format
repo_list=<json-file-list-repo>
author=<your-name>
since=<since-date>
write repository list in JSON array in C:\Users\<user>\AppData\Roaming\gitlog\repositories\*.json, you can put as many files as you need here, the list goes like this:
[
"C:/Users/caesar/projects/e-commerce",
"C:/Users/caesar/projects/student-management-system"
]How to:
Open Windows Powershell or command prompt navigate to where you clone gitlog, then descend to usr/bin and run the following command,
python gitlog.pyThis project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Feel free to open an issue or submit a pull request.
Developed by caesar003