Skip to content

A simple tool to re-organize commits so you can iterate through a repository like a story

Notifications You must be signed in to change notification settings

NukaCody/git-story

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Git-Story

EDIT: I'm dumb. git log --first-parent --date-order --reverse --abbrev-commit does everything you want and more. Leaving this public so no one makes the same mistake


A very silly tool that takes the current HEAD pointer and prints the commit history in reverse order (first to last). I use this with VSCode to see the story of a repository

Example Usage

Grab the commit history of a repo and log it to a file

go run main.go --repo https://github.com/hashicorp/consul > consul-hist.log 

Print the abbreviated commits from n to m. i.e print the first 10 commits (Or you could just open the file in a text editor).

head -n 10 consul-hist.log | tail -n +1

Go to the beginning (first commit may differ)

git checkout 0a7996bc

Walk through commits one by one

git checkout HEAD@{1}

Go back a commit

git checkout HEAD^1

FAQ

Q: Can't you do this with bash scripting? A: Probably, but I aint a masochist.

About

A simple tool to re-organize commits so you can iterate through a repository like a story

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages