Skip to content

Instantly share code, notes, and snippets.

@eric1234
Created September 14, 2009 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eric1234/186833 to your computer and use it in GitHub Desktop.
Save eric1234/186833 to your computer and use it in GitHub Desktop.
Will compare a fork of a project with the original to get a single diff of what the fork has done.
#!/bin/sh
# Provides a way to compare a fork against the original it is based
# on so you can get a general idea of what is in a fork.
#
# git-fork-compare <original> <fork>
TMP_GIT=`mktemp -d`;
rmdir $TMP_GIT;
git clone -q $2 $TMP_GIT;
cd $TMP_GIT;
git remote add orig $1;
git fetch -q orig > /dev/null 2>&1;
git diff orig/master...master;
rm -rf $TMP_GIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment