Skip to content

Instantly share code, notes, and snippets.

@guywithnose
Last active October 13, 2015 21:57
Show Gist options
  • Save guywithnose/4261449 to your computer and use it in GitHub Desktop.
Save guywithnose/4261449 to your computer and use it in GitHub Desktop.
Get file list script
if [ $# == 0 ]
then
git diff `git merge-base HEAD {defaultRemote}/master` --name-only
else
if [ $# == 1 ]
then
git diff `git merge-base HEAD $1/master` --name-only
else
git diff `git merge-base HEAD $1/$2` --name-only
fi
fi
@chrisryan
Copy link

Could you just use git diff --name-only {reference}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment