Giter VIP home page Giter VIP logo

h6y3 / commit_analysis Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

This repository contains scripts designed to analyze Git repositories for team contributions over the last year, excluding merge commits. The scripts generate CSV reports that summarize lines of code changed, commit counts by author, and aggregate commit counts across all specified repositories

License: MIT License

Shell 100.00%

commit_analysis's Introduction

Git Repository Analysis Scripts

This repository contains scripts designed to analyze Git repositories for team contributions over the last year, excluding merge commits. The scripts generate CSV reports that summarize lines of code changed, commit counts by author, and aggregate commit counts across all specified repositories.

Overview

  • generate_lines_changed.sh: Generates reports summarizing lines added, removed, and net changes by each author.
  • generate_commit_counts.sh: Counts the number of commits made by each author.
  • aggregate_commits.sh: Aggregates commit counts across all repositories and outputs the summary to a CSV file.

Prerequisites

  • Git
  • Bash shell
  • awk utility (usually pre-installed on Linux and macOS)

Setup

  1. Clone or download these scripts to your local machine.
  2. Ensure the scripts are executable:
    chmod +x generate_lines_changed.sh generate_commit_counts.sh aggregate_commits.sh
  3. Create a repo_paths.conf file in the same directory as the scripts. List the full path to each Git repository you wish to analyze, one per line.

Usage

Lines of Code Changed Report

  1. Run generate_lines_changed.sh from the terminal:
    ./generate_lines_changed.sh
  2. The script creates a directory named repo_lines_change_by_author and generates a CSV report for each repository listed in repo_paths.conf, summarizing the lines of code changed by each author.

Commit Counts Report

  1. Run generate_commit_counts.sh from the terminal:
    ./generate_commit_counts.sh
  2. This script creates a directory named repo_commit_counts_by_author and generates a CSV report for each repository, listing the number of commits by each author.

Aggregated Commit Counts Report

  1. Run aggregate_commits.sh from the terminal:
    ./aggregate_commits.sh
  2. This script processes all repositories listed in repo_paths.conf, aggregates commit counts by author across all repositories, and outputs the results to aggregate_commits.csv.

Output

  • The generate_lines_changed.sh and generate_commit_counts.sh scripts output files named repo_lines_changed_by_author_[repo_name].csv and repo_commit_counts_by_author_[repo_name].csv, stored in their respective directories.
  • The aggregate_commits.sh script outputs a file named aggregate_commits.csv, summarizing aggregated commit counts by author across all specified repositories.

Notes

  • All scripts exclude merge commits to focus on direct contributions with the exception of aggregate_commits.sh
  • The analyses are based on contributions within the last year.
  • Ensure your repo_paths.conf file contains valid Git repository paths for accurate analysis.

commit_analysis's People

Contributors

h6y3 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.