Skip to content

Instantly share code, notes, and snippets.

@jhuttner
Last active August 29, 2015 13:56
Show Gist options
  • Save jhuttner/8795868 to your computer and use it in GitHub Desktop.
Save jhuttner/8795868 to your computer and use it in GitHub Desktop.
git-who-owns-what
#!/bin/bash
# git-who-owns-what
#
# Requires: git-remote-authors: https://gist.github.com/jhuttner/8795653
#
# Print the branches that each user was the last committer for.
#
# Place this script in your PATH, chmod +x it, and git will allow you to magically do:
# $ git who-owns-what
#
# Author: [email protected]
# Last modified: 3 February 2014
#!/bin/bash
names=\
"First1 Last1
First2 Last2
First3 Last3"
while read i; do echo --- $i; git remote-authors 1 | grep -B1 "$i" | grep Branch; done < <(echo -e "$names")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment