Skip to content

JMARyA/giterator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Giterator

Ever wondered why Git histories exist if we just ignore them? Giterator is a powerful command-line tool designed to simplify your Git workflow by providing seamless iteration over commit histories. Explore your project's evolution effortlessly, perform analyses, execute scripts, and generate output in various formats.

Usage

Count Lines of Code (LoC) Over Time

# Count lines of code in Rust files over time
giterator 'find . -type f -name "*.rs" -exec cat {} + | wc -l'

Explore Commits in Another Repository

giterator command other_repo

Execute Custom Script over each Commit

# Run a custom script (myscript.sh) on each commit in a repository
giterator --script myscript.sh on_my_repo

Output in JSON Format

# Generate JSON output for commit analysis
giterator --json command

Output in CSV Format

# Generate CSV output for commit analysis
giterator --csv command

Environment Variables

When running a custom script or command with Giterator, the following environment variables are automatically exposed:

  • $GIT_REPO: The name of the repository being iterated over.
  • $COMMIT_HASH: The hash of the current commit being processed.
  • $COMMIT_DATETIME: The date and time of the current commit being processed.
  • $COMMIT: The name of the current commit being processed.

These environment variables allow your custom script or command to access important information about the repository and the current commit being iterated over. You can use these variables to customize the behavior of your script or command.

About

Run commands for each git commit

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages