Skip to content

Instantly share code, notes, and snippets.

@kaeff
Created May 4, 2015 08:42
Show Gist options
  • Save kaeff/91bde42ea2f3ab310ea9 to your computer and use it in GitHub Desktop.
Save kaeff/91bde42ea2f3ab310ea9 to your computer and use it in GitHub Desktop.
A script listing the commit ranges applied during `git pull --rebase`, one line per pull in descending order
#!/usr/bin/env bash
git reflog | grep -A 1 "pull --rebase: checkout" | ruby -e 'puts STDIN.each_slice(3).map {|a| a.take(2).reverse.map {|l| l.split(" ").first}.join("..") }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment