• Stars
    star
    1,845
  • Rank 25,153 (Top 0.5 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rewind is an intelligent archivist.

Rewind: git history analysis scripts

A small library of handy git analysis scripts roughly inspired by Gary Bernhardt's Destroy All Software screencasts, and extensively documented in my ebook Unfuck A Monorail For Great Justice.

Use these when you want to quickly generate meaningful history reports for git projects.

stats

Run a statistics bash script against a git repository. For each filename, discover lines of code, number of commits, and the date of the first and the last commit. Then pull that into a spreadsheet app, sort by each metric, and get an idea which files are the most important files in the history of the project.

bash file_stats.sh [dir] [filetypes] > stats.csv
open -a Numbers stats.csv

For example:

bash file_stats.sh /ember-project "js" "handlebars"

Or:

bash file_stats.sh /rails-project "rb" "haml" "coffee" "scss"

authorship

This is more tricky, and requires Ruby. First run the determine_authors.sh script to get a count of all the authorship events in the repo; then run the tally_authors.rb Ruby script to sort the authorship events by name.

You can do all that as a one-liner in bash like this:

ruby tally_authors.rb <(cd /project && /this_dir/determine_authors.sh "js")

The code isn't tricky at all, and the output is easy to understand, but it's also easy to misconstrue. That's the tricky part. A developer could show up with few authorship events because they're new to a team, because they often do pair programming, because they prefer large commits to small ones, or for several other possible reasons. Exercise good judgement.

Also, where file_stats.sh will examine multiple file types, determine_authors.sh and tally_authors.rb assumes you're only working with one type of file at a time. Pull requests welcome!

Caveat: Running this code against extremely large projects with very long histories (e.g. Rails) might be very slow.

Why Rewind?

Rewind is currently a key character in the IDW Transformers comics.

license

MIT license.

More Repositories

1

archaeopteryx

Ruby MIDI DJing/live-coding thing
Ruby
358
star
2

utility-belt

IRB Power User Utility Belt
Ruby
91
star
3

hacker_newspaper

hacker news reformatted
Python
51
star
4

git-smudge-and-clean

brief repo which demonstrates how git's smudge and clean filters work
49
star
5

wheatley

javascript semi-automated refactoring
Ruby
28
star
6

towelie

Towelie keeps your code dry, and likes to get high.
Ruby
17
star
7

ir_black

fork of Infinite Red's excellent vim theme
Vim Script
17
star
8

arx

Semi-random drum-and-bass via Overtone
Clojure
15
star
9

linkparser

A high-level interface to the CMU Link Grammar.
C
15
star
10

minimal-github-dashboard

No RSS, no inbox, no notifications, nothing but "where was that repo? oh OK click here"
JavaScript
13
star
11

blog_ads

Ad-generating experiment for my blog
Ruby
11
star
12

basic-beat

simple drum machine and beat in SuperCollider
HTML
10
star
13

visijax

Dead-dumb simple Ajax spreadsheet Rails app
JavaScript
9
star
14

lattice

drop7 clone in Ruby
Ruby
8
star
15

learning-ember-via-github-notifications

Ember demo app built against GitHub notifications API
JavaScript
8
star
16

markov-bass-lines

markov chain bass lines, wacm 2013
Clojure
8
star
17

BuscandoElViento

Search migrations gem for PostgreSQL
Ruby
7
star
18

dotjsfiles

my dotfiles for defunkt/dotjs
JavaScript
6
star
19

supercollider-complete-track

A house track in SuperCollider. See the blog post on truthindustri.es
HTML
6
star
20

syrinx

twitter link-filtering library / sandbox for 'destroy all software' techniques
Ruby
6
star
21

flexverb

FlexVerb: A Serious Toy Language
Ruby
5
star
22

fashion-police

Fashion Police enforces code style.
Ruby
5
star
23

missing-rubyconf

a simple sibilant / node.js twitter scanner
Common Lisp
4
star
24

mira

bare-minimum Viddler gem
Ruby
4
star
25

propane-theme

My CSS for Propane
4
star
26

ember-animation-hello-world

Ember Animation "Hello World"
JavaScript
4
star
27

clojure-circles

animations loosely related to circles and bit101's ancient Flash tutorial. begun at wacm, continued for a live performance in May 2014. and continuing...
Clojure
4
star
28

tweenr

SVG Animation In Ruby (based on Topher Cyll's book)
Ruby
3
star
29

Neo-Geo

simple test page for determining your mobile device geolocation haps
3
star
30

Disqus-Blog-Comment-Similarity-Detector

me beating up on Disqus. sorry Disqus! simple tweet similarity detection in JavaScript.
JavaScript
3
star
31

Variance

unfinished miniapp
Ruby
3
star
32

1password-Importer

imports from password gem to 1password
Ruby
3
star
33

feedback-re-modern-front-end-dev-with-rails-and-puppies

User feedback for my new book, Modern Front-End Development with Ruby on Rails and Puppies
3
star
34

minim.al-bit.ly

bit.ly with less user interface
JavaScript
3
star
35

objectify

Objects on rails. ZOMG.
Ruby
2
star
36

MSPA-Update-Alerter

Streamline mspaintadventures.com consumption experience
Ruby
2
star
37

Rosewood-Migrations

Sophisticated comfort for the chosen few.
Ruby
2
star
38

mesh

experiment
C++
2
star
39

restricted_subclassing_demo

Demos Ruby class restricting behavior of its subclasses
2
star
40

LambdaPeriodicalUpdater

Handy Prototype class that allows you to create a PeriodicalUpdater which takes a function instead of a string for its URL arg
JavaScript
2
star
41

Destro

Destro kills CI Joes.
1
star
42

btcusd

simple btc->usd exchange rate miniapp
Ruby
1
star
43

rigger

like capistrano / vlad except less shitty (but still somewhat shitty)
Ruby
1
star
44

t1000

Chrome skin
1
star
45

Raphael-Cat-s-Cradle

Attempt to redo my "cat's cradle" 2004 Flash animation in Raphael.js
JavaScript
1
star
46

welder

Cheat script for iOS game W.E.L.D.E.R.
Clojure
1
star
47

tweetwtf

simple tweet-grabber. not much more than a Gist really
Ruby
1
star
48

twitter_antispam_hack

experiment to see if I can kill spam via dotjs
JavaScript
1
star
49

Railscasts-RepoSplitter

set up distinct repos for each Railscast
Ruby
1
star
50

dots

Fruchterman-Reingold Particle Simulation Algorithm
Ruby
1
star